Uploaded image for project: 'translate5'
  1. translate5
  2. TRANSLATE-982

Undefined offset error message in change alike handling

    XMLWordPrintable

Details

    • Bug
    • Resolution: Fixed
    • None
    • None
    • Repetition editor

    Description

      problem

      translate5 throws the error
      "Undefined offset: 18; File: /webs/www.translate5.net/application/modules/editor/Controllers/AlikesegmentController.php; Line: 179; errno: 8"
      Complete stack trace see below.
      Testdata is stored locally as TRANSLATE-982-de-fr.zip. Affected segments are:
      -----------------

      segmentNrInTask

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

      2718
      3258
      3415

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

      For reproduction the config runtimeOptions.import.xlf.preserveWhitespace must be set to 1, since the task was imported before the preserveWhitespace feature was online.

      reason

      The user was translating segment nr 2718 and its repetitions with content and tags.
      Then the user edited the segment again, some tags were removed. Either by the user or by another bug on taking over matches from TM.
      Since in the new content there were lesser tags as in the previous content, this leads to the below undefined index error.

      solution proposal

      On translation tasks, the implementation of TRANSLATE-680 must be extended, so that the correct tags are taken from the source of the repetition and not the tags of segment which triggers the repetition editor.
      The solution for the following scenario is open:

      1. translate a segment and fill repetitions with repetition editor
      2. reedit the segment and remove tags
      3. This triggers the tag protection dialog, but the segment can be saved anyway
      4. This leads to the same error in repetitions
        How to solve this?

      trace

      ZfExtended_Log on www.translate5.net: exception 'Zend_Exception' with message 'Undefined offset: 18; File: /webs/www.translate5.net/application/modules/editor/Controllers/AlikesegmentController.php; Line: 179; errno: 8' in /webs/www.translate5.net/library/ZfExtended/Resource/ErrorHandler.php:122
      Stack trace:
      #0 /webs/www.translate5.net/application/modules/editor/Controllers/AlikesegmentController.php(179): ZfExtended_Resource_ErrorHandler::errorHandler(8, 'Undefined offse...', '/webs/www...', 179, Array)
      #1 [internal function]: Editor_AlikesegmentController->

      {closure}(Array)
      #2 /webs/www.translate5.net/application/modules/editor/Models/Segment/InternalTag.php(68): preg_replace_callback('#<div
      s*class="...', Object(Closure), '<div class="sin...', -1, 26)
      #3 /webs/www.translate5.net/application/modules/editor/Controllers/AlikesegmentController.php(180): editor_Models_Segment_InternalTag->replace('<div class="sin...', Object(Closure))
      #4 /webs/www.translate5.net/application/modules/editor/Controllers/AlikesegmentController.php(309): Editor_AlikesegmentController->{closure}

      ('target', 'targetEdit', 'getTargetEdit', 'setTargetEdit')
      #5 /webs/www.translate5.net/application/modules/editor/Controllers/AlikesegmentController.php(184): Editor_AlikesegmentController->fieldLoop(Object(Closure))
      #6 /webs/includes/ZendFramework-1.12.9-minimal/library/Zend/Controller/Action.php(516): Editor_AlikesegmentController->putAction()
      #7 /webs/www.translate5.net/library/ZfExtended/Controllers/AAARestController.php(247): Zend_Controller_Action->dispatch('putAction')
      #8 /webs/includes/ZendFramework-1.12.9-minimal/library/Zend/Controller/Dispatcher/Standard.php(308): ZfExtended_RestController->dispatch('putAction')
      #9 /webs/includes/ZendFramework-1.12.9-minimal/library/Zend/Controller/Front.php(954): Zend_Controller_Dispatcher_Standard->dispatch(Object(REST_Controller_Request_Http), Object(Zend_Controller_Response_Http))
      #10 /webs/includes/ZendFramework-1.12.9-minimal/library/Zend/Application/Bootstrap/Bootstrap.php(101): Zend_Controller_Front->dispatch()
      #11 /webs/includes/ZendFramework-1.12.9-minimal/library/Zend/Application.php(366): Zend_Application_Bootstrap_Bootstrap->run()
      #12 /webs/www.translate5.net/library/ZfExtended/BaseIndex.php(167): Zend_Application->run()
      #13 /webs/www.translate5.net/public/index.php(36): ZfExtended_BaseIndex->startApplication()
      #14

      {main}

      Aufgerufene URL inkl. ggf. vorhandener POST-Parameter als get-Parameter:

      /editor/alikesegment/put/id/353318/format/json/duration/1888/alikes/[352621,353161]

      Attachments

        Issue Links

          Activity

            People

              tlauria Thomas Lauria
              tlauria Thomas Lauria
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: