Typo3 4.6: get related models based on the workspace

I have two tables, two models and two repositories.

  • Sections
  • Movies

Faqs relate to partitions ( one partition has many faqs). This relationship is fulfilled by storing the uid section in faq.

In my templates, I do:

<f:for each="{section.faqs}" as="faq"> <h3 class="question"><a href="#"><f:format.html>{faq.question}</f:format.html></a></h3> </f:for> 

What displays faqs in this section.

This works as expected on the front side as a regular user.

However, when I view the page in the DRAFT workspace. Any draft questions are not displayed. I can only see faqs that are in the workspace. However, I can see sections from the project workspace.

Something is wrong in the relationship between faqs and partitions.

How to display faqs in sections of a project workspace?

+4
source share
2 answers

This is just an assumption, but perhaps versioning in the workspace is not included in ext_tables.php: Check faq table settings

 $TCA['tx_yourextensioncode_faq'] = array ( 'ctrl' => array ( ... 'versioningWS' => TRUE, 'versioning_followPages' => TRUE, 'origUid' => 't3_origuid', ), ); 

Or vice versa - maybe you need to disable it. ext_tables.php or Tca.php should be the place to check.

0
source

no, workspaces and extbase do not merge in 4.6. Extbase comes with very simple and mostly faulty workspace support, and everything related to versioning related objects will be broken. The same for TYPO3 4.7 and most likely also for the upcoming 6.0

0
source

Source: https://habr.com/ru/post/1401844/


All Articles