eZ Community » Forums » General » object relations and multilingual
expandshrink

object relations and multilingual

object relations and multilingual

Monday 08 April 2013 11:44:34 am - 2 replies

Hi,I have a problem with my object relations on the multilingual site :When I create a new node in French language and I fill a related

  1. Create a new node in French
  2. Fill the "Related content" field (datatype : object relations) with French object.
     
    • Object 1 (FR)
    • Object 2 (FR)
  3. In front office (fre siteaccess), object 1 and object2 appear (with fetch('content', 'related_object' ...))
  4. Create a new traduction of this content in English
  5. Fill the "Related content" field (datatype : object relations) with French object. (There's mix language content in the English site version (ShowUntranslatedObjects=enabled in site.ini)
     
    • Object 3 (FR)
    • Object 4 (EN)
  6. In front office (fre siteaccess), object 3 appears (with fetch('content', 'related_object' ...)) instead of object 1 and object2 (french version) !!!!
  7. Update the node in French
  8. Fill the "Related content" field (datatype : object relations) with French object.
     
    • Object 1 (FR)
    • Object 2 (FR)
    • Object 5 (FR)
  9. In front office (fre siteaccess), object 1,  object2, object3 and object5  appear (with fetch('content', 'related_object' ...)) instead of object 1, object2 and object5 only (french version) !!!!

 -----------------------------------------------
 In ezcontentobject_link table
 -----------------------------------------------

See image

I hope you'll can help me !

Modified on Monday 08 April 2013 11:47:00 am by Julie Staab

Thursday 18 April 2013 12:41:13 pm

Hi Julie,

Is the object relations field in the Content class set to be translatable?  What version of eZ Publish are you using?

The fetch function is a possible problem here, depending on your parameters.  Have you tried just using $node.data_map.object_relations_field_name.content instead?

Cheers,
Geoff 

Sunday 08 June 2014 5:40:14 pm

Hello Julie!

I used this code

   {foreach $related_content as $related_object max 7}
    <li>
       <a href="{$related_object.url_alias|ezurl( 'no' )}" title="{$related_object.name|wash()}">
          {$related_object.data_map.title.content|wash()}
      </a>
   </li>
  {/foreach}

to solve the same problem.

Modified on Sunday 08 June 2014 5:46:44 pm by Maxim Kopytov

expandshrink

You must be logged in to post messages in this topic!

36 542 Users on board!

Forums menu

Proudly Developed with from