Uploaded image for project: 'eZ Publish / Platform'
  1. eZ Publish / Platform
  2. EZP-15233

Multilingual site with one language/site Location did not validate : A node in the node assignment list has been deleted + Fatal Error

    XMLWordPrintable

Details

    • Icon: Bug Bug
    • Resolution: Obsolete
    • Icon: Medium Medium
    • Future
    • 4.0.6
    • None
    • Operating System: Debian 4.0 (Etch)
      PHP Version: PHP 5.2.6-0.dotdeb.1 with Suhosin-Patch 0.9.6.2
      Database and version: MySQL 5.0.32-Debian_7etch6-log

    Description

      Hi,

      I'm confronted with a strange behaviour on a multilingual multi content tree eZ installation.
      There is 4 sites, each site is available in French, English and Spanish, which gives 12 front siteaccesses (4 sites x 3 languages) and 1 admin siteaccess.
      Each front website is configured to display only one language (ShowUntranslated=disabled, SiteLanguageList contains only one language).
      RootNode = 2
      — 300 = Site A Root Node
      — 301 = Site B Root Node
      — 302 = Site C Root Node
      — 303 = Site D Root Node

      When publishing a content at its main location on a Spanish or English front website, I get a validation error :
      -------------------
      Location did not validate

      • A node in the node assignment list has been deleted.
        -------------------

      If I hit the publish button nonetheless, I get a Fatal Error and this message in the PHP error log :
      -------------------
      [Fri Jul 31 10:01:48 2009] [error] [client IP] PHP Fatal error: Call to a member function attribute() on a non-object in kernel/classes/ezcontentobjecttreenode.php on line 3969, referer: http://eng.mysite.com/content/edit/3271/19/eng-GB
      -------------------

      This content has :
      a) already been translated in the 3 languages (hence my ability to edit it in the English website)
      b) several locations : the main is in the current website, two others in different "website tree"

      Off these 2 additional locations, one parent is already translated in all language, another one is only available in French and doesn't have the "always available" flag.
      It's obviously this parent that causes the problem.

      Here is the content of the eznode_assignement table for an edited version of the object BEFORE clicking on the Publish button :
      ------------cut-----------------
      mysql> select * from eznode_assignment where contentobject_id = 3271 and contentobject_version = 19;
      ------------------------------------------------------------------------------------------------------------------------------

      contentobject_id contentobject_version from_node_id id is_main op_code parent_node parent_remote_id remote_id sort_field sort_order

      ------------------------------------------------------------------------------------------------------------------------------

      3271 19 -1 14409 0 2 3652   0 8 1
      3271 19 -1 14410 0 2 3765   0 8 1
      3271 19 -1 14411 1 2 3313   0 8 1

      ------------------------------------------------------------------------------------------------------------------------------
      3 rows in set (0.00 sec)
      ------------cut-----------------

      Here is the content of the eznode_assignement table for an edited version of the object AFTER clicking on the Publish button and getting the validation error :
      ------------cut-----------------
      mysql> select * from eznode_assignment where contentobject_id = 3271 and contentobject_version = 19;
      ------------------------------------------------------------------------------------------------------------------------------

      contentobject_id contentobject_version from_node_id id is_main op_code parent_node parent_remote_id remote_id sort_field sort_order

      ------------------------------------------------------------------------------------------------------------------------------

      3271 19 -1 14410 0 2 3765   0 8 1
      3271 19 -1 14411 1 2 3313   0 8 1

      ------------------------------------------------------------------------------------------------------------------------------
      2 rows in set (0.00 sec)
      ------------cut-----------------

      It's the parent node 3652 that is only available in French (and doesn't have the "always available" flag).

      It's quite obvious : during the placement validation, eZ fetches the parent node WITH the current website language settings ("English only please"), hence not getting the 3652 node and the validation error.
      I don't really see why the language settings should be used at that particular moment, but let's say it's a strange "feature" that could be fixed.

      What puzzles me a bit more, is the Fatal Error if I decide to Publish the content after the validation error.
      I wouldn't say "Publish the content anyway", because the "incorrect" node assignment has been removed already (in eznode_assignement, that is) and there is no way to avoid the error at this stage but by discarding the draft.

      Steps to reproduce

      I don't think the "multi website" context is really relevant.

      So one could stick to a multilingual website, 3 siteaccess : admin, site_fre, site_eng.

      • siteaccess site_fre displays only French (ShowUntranslated=disabled, SiteLanguageList[]=fre-FR)
      • siteaccess site_eng displays only English (ShowUntranslated=disabled, SiteLanguageList[]=eng-GB)

      In the admin interface, create two folders, one available in French and English, one only available in French.
      Both folders have the "always_available" flag UNCHECKED.
      Below the folder available in both English and French, create and translate an article (it will be available in both languages).
      Add a location for the article below the "French only" folder.

      Browse the "English only" website (site_eng) and check that you can't access the "French only" folder (by content/view/full/<node-id>) and get a kernel error (3).
      Log into the "English only" website as admin, edit the multilingual article.
      The problem should occur when publishing.

      Attachments

        Activity

          People

            unknown unknown
            rba_ic rba_ic
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated: