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

(Public API) updating an object is returning an database error

    Details

    • Sprint:
      Stetind Sprint 6

      Description

      If i try to update an created object i get the following error:

      1) eZPublishAPIRelationsList::testTC1505UpdateAnObjectRelationsListObject
      RuntimeException: Database error
      

      https://gist.github.com/jpingo/9da209ded0918c2e704b#file-gistfile1-php-L243

        Activity

        Hide
        Pedro Resende (Inactive) added a comment - - edited

        This issue occurs every time you try to do a $contentInfo->setField to an existing object.

        Show
        Pedro Resende (Inactive) added a comment - - edited This issue occurs every time you try to do a $contentInfo->setField to an existing object.
        Hide
        Pedro Resende (Inactive) added a comment -

        /var/www/apache2php53/ezp/vendor/ezsystems/ezpublish-kernel/eZ/Publish/Core/Persistence/Legacy/Content/Gateway/ExceptionConversion.php:740
        /var/www/apache2php53/ezp/vendor/ezsystems/ezpublish-kernel/eZ/Publish/Core/Persistence/Legacy/Content/Handler.php:664
        /var/www/apache2php53/ezp/vendor/ezsystems/ezpublish-kernel/eZ/Publish/Core/Repository/ContentService.php:1511
        /var/www/apache2php53/ezp/vendor/ezsystems/ezpublish-kernel/eZ/Publish/Core/Repository/ContentService.php:1253
        /var/www/apache2php53/ezp/vendor/ezsystems/ezpublish-kernel/eZ/Publish/Core/SignalSlot/ContentService.php:392
        /var/www/apache2php53/ezp/ezpublish_testsystem/extension/ezpublishapitests/classes/ezpublishapitesthelper.php:846
        /var/www/apache2php53/ezp/ezpublish_testsystem/extension/ezpublishapitests/tests/ezpublishapi/ezpublishapi/kanban/ezp19923/19923_ezsurvey/eZPublishAPIEzp19923_ezsurvey.php:47
        /var/www/apache2php53/ezp/ezpublish_testsystem/extension/selenium/classes/ezpselenesetest.php:724
        /var/www/apache2php53/ezp/ezpublish_testsystem/extension/ezpublishapitests/classes/ezpublishapitest.php:116
        /var/www/apache2php53/ezp/ezpublish_testsystem/extension/ezpublishapitests/tests/ezpublishapi/ezpublishapi/kanban/ezp19923/19923_ezsurvey/eZPublishAPIEzp19923_ezsurvey.php:17
        /var/www/apache2php53/ezp/ezpublish_testsystem/extension/selenium/classes/ezpselenesetest.php:753
        /var/www/apache2php53/ezp/ezpublish_testsystem/tests/toolkit/ezptestrunner.php:372

        Show
        Pedro Resende (Inactive) added a comment - /var/www/apache2php53/ezp/vendor/ezsystems/ezpublish-kernel/eZ/Publish/Core/Persistence/Legacy/Content/Gateway/ExceptionConversion.php:740 /var/www/apache2php53/ezp/vendor/ezsystems/ezpublish-kernel/eZ/Publish/Core/Persistence/Legacy/Content/Handler.php:664 /var/www/apache2php53/ezp/vendor/ezsystems/ezpublish-kernel/eZ/Publish/Core/Repository/ContentService.php:1511 /var/www/apache2php53/ezp/vendor/ezsystems/ezpublish-kernel/eZ/Publish/Core/Repository/ContentService.php:1253 /var/www/apache2php53/ezp/vendor/ezsystems/ezpublish-kernel/eZ/Publish/Core/SignalSlot/ContentService.php:392 /var/www/apache2php53/ezp/ezpublish_testsystem/extension/ezpublishapitests/classes/ezpublishapitesthelper.php:846 /var/www/apache2php53/ezp/ezpublish_testsystem/extension/ezpublishapitests/tests/ezpublishapi/ezpublishapi/kanban/ezp19923/19923_ezsurvey/eZPublishAPIEzp19923_ezsurvey.php:47 /var/www/apache2php53/ezp/ezpublish_testsystem/extension/selenium/classes/ezpselenesetest.php:724 /var/www/apache2php53/ezp/ezpublish_testsystem/extension/ezpublishapitests/classes/ezpublishapitest.php:116 /var/www/apache2php53/ezp/ezpublish_testsystem/extension/ezpublishapitests/tests/ezpublishapi/ezpublishapi/kanban/ezp19923/19923_ezsurvey/eZPublishAPIEzp19923_ezsurvey.php:17 /var/www/apache2php53/ezp/ezpublish_testsystem/extension/selenium/classes/ezpselenesetest.php:753 /var/www/apache2php53/ezp/ezpublish_testsystem/tests/toolkit/ezptestrunner.php:372
        Hide
        Pedro Resende (Inactive) added a comment - - edited

        André Rømcke: After adding the try catch you've asked

        try
        {
            // api action
        }
        catch ( \RuntimeException $e )
        {
            var_dump( $e->getPrevious() );
            throw $e;
        }
        

        I wasn't able to attach the output since when I stopped the run the file already had 6 GB :|

        Show
        Pedro Resende (Inactive) added a comment - - edited André Rømcke : After adding the try catch you've asked try { // api action } catch ( \RuntimeException $e ) { var_dump( $e->getPrevious() ); throw $e; } I wasn't able to attach the output since when I stopped the run the file already had 6 GB :|
        Hide
        Pedro Resende (Inactive) added a comment - - edited

        After commenting

                // catch ( \PDOException $e )
                // {
                //     throw new \RuntimeException( 'Database error', 0, $e );
                // }
        

        in the vendor/ezsystems/ezpublish-kernel/eZ/Publish/Core/Persistence/Legacy/Content/Gateway/ExceptionConversion.php:740

        the output was the following

        1) eZPublishAPIEzp19923_eZComments::testTC1510MissingConfigForNullTypeFieldTypesCausesExceptionsEzComments
        PDOException: SQLSTATE[42S22]: Column not found: 1054 Unknown column 'ezcontentobject_link.op_code' in 'field list'
         
        /var/www/apache2php53/ezp/vendor/ezsystems/ezpublish-kernel/eZ/Publish/Core/Persistence/Legacy/Content/Gateway/EzcDatabase.php:1381
        /var/www/apache2php53/ezp/vendor/ezsystems/ezpublish-kernel/eZ/Publish/Core/Persistence/Legacy/Content/Gateway/ExceptionConversion.php:732
        /var/www/apache2php53/ezp/vendor/ezsystems/ezpublish-kernel/eZ/Publish/Core/Persistence/Legacy/Content/Handler.php:664
        /var/www/apache2php53/ezp/vendor/ezsystems/ezpublish-kernel/eZ/Publish/Core/Repository/ContentService.php:1511
        /var/www/apache2php53/ezp/vendor/ezsystems/ezpublish-kernel/eZ/Publish/Core/Repository/ContentService.php:1253
        /var/www/apache2php53/ezp/vendor/ezsystems/ezpublish-kernel/eZ/Publish/Core/SignalSlot/ContentService.php:392
        /var/www/apache2php53/ezp/ezpublish_testsystem/extension/ezpublishapitests/classes/ezpublishapitesthelper.php:846
        /var/www/apache2php53/ezp/ezpublish_testsystem/extension/ezpublishapitests/tests/ezpublishapi/ezpublishapi/kanban/ezp19923/19923_ezcomcomments/eZPublishAPIEzp19923_ezcomments.php:50
        /var/www/apache2php53/ezp/ezpublish_testsystem/extension/selenium/classes/ezpselenesetest.php:724
        /var/www/apache2php53/ezp/ezpublish_testsystem/extension/ezpublishapitests/classes/ezpublishapitest.php:116
        /var/www/apache2php53/ezp/ezpublish_testsystem/extension/ezpublishapitests/tests/ezpublishapi/ezpublishapi/kanban/ezp19923/19923_ezcomcomments/eZPublishAPIEzp19923_ezcomments.php:17
        /var/www/apache2php53/ezp/ezpublish_testsystem/extension/selenium/classes/ezpselenesetest.php:753
        /var/www/apache2php53/ezp/ezpublish_testsystem/tests/toolkit/ezptestrunner.php:372
        
        

        Show
        Pedro Resende (Inactive) added a comment - - edited After commenting // catch ( \PDOException $e ) // { // throw new \RuntimeException( 'Database error', 0, $e ); // } in the vendor/ezsystems/ezpublish-kernel/eZ/Publish/Core/Persistence/Legacy/Content/Gateway/ExceptionConversion.php:740 the output was the following 1) eZPublishAPIEzp19923_eZComments::testTC1510MissingConfigForNullTypeFieldTypesCausesExceptionsEzComments PDOException: SQLSTATE[42S22]: Column not found: 1054 Unknown column 'ezcontentobject_link.op_code' in 'field list'   /var/www/apache2php53/ezp/vendor/ezsystems/ezpublish-kernel/eZ/Publish/Core/Persistence/Legacy/Content/Gateway/EzcDatabase.php:1381 /var/www/apache2php53/ezp/vendor/ezsystems/ezpublish-kernel/eZ/Publish/Core/Persistence/Legacy/Content/Gateway/ExceptionConversion.php:732 /var/www/apache2php53/ezp/vendor/ezsystems/ezpublish-kernel/eZ/Publish/Core/Persistence/Legacy/Content/Handler.php:664 /var/www/apache2php53/ezp/vendor/ezsystems/ezpublish-kernel/eZ/Publish/Core/Repository/ContentService.php:1511 /var/www/apache2php53/ezp/vendor/ezsystems/ezpublish-kernel/eZ/Publish/Core/Repository/ContentService.php:1253 /var/www/apache2php53/ezp/vendor/ezsystems/ezpublish-kernel/eZ/Publish/Core/SignalSlot/ContentService.php:392 /var/www/apache2php53/ezp/ezpublish_testsystem/extension/ezpublishapitests/classes/ezpublishapitesthelper.php:846 /var/www/apache2php53/ezp/ezpublish_testsystem/extension/ezpublishapitests/tests/ezpublishapi/ezpublishapi/kanban/ezp19923/19923_ezcomcomments/eZPublishAPIEzp19923_ezcomments.php:50 /var/www/apache2php53/ezp/ezpublish_testsystem/extension/selenium/classes/ezpselenesetest.php:724 /var/www/apache2php53/ezp/ezpublish_testsystem/extension/ezpublishapitests/classes/ezpublishapitest.php:116 /var/www/apache2php53/ezp/ezpublish_testsystem/extension/ezpublishapitests/tests/ezpublishapi/ezpublishapi/kanban/ezp19923/19923_ezcomcomments/eZPublishAPIEzp19923_ezcomments.php:17 /var/www/apache2php53/ezp/ezpublish_testsystem/extension/selenium/classes/ezpselenesetest.php:753 /var/www/apache2php53/ezp/ezpublish_testsystem/tests/toolkit/ezptestrunner.php:372
        Hide
        Petar Spanja (Inactive) added a comment -

        Found the issue, fix coming shortly.

        Show
        Petar Spanja (Inactive) added a comment - Found the issue, fix coming shortly.
        Hide
        Petar Spanja (Inactive) added a comment -

        Fixed in https://github.com/ezsystems/ezpublish-kernel/commit/72806d27d71f42a960a9ce68b09dff635af89548

        Was caused by "op_code" usage not completely removed from Legacy, this popped up when updated DB was used.

        Show
        Petar Spanja (Inactive) added a comment - Fixed in https://github.com/ezsystems/ezpublish-kernel/commit/72806d27d71f42a960a9ce68b09dff635af89548 Was caused by "op_code" usage not completely removed from Legacy, this popped up when updated DB was used.

          People

          • Assignee:
            Unassigned
            Reporter:
            Joao Pingo (Inactive)
          • Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Time Tracking

              Estimated:
              Original Estimate - 4 hours
              4h
              Remaining:
              Remaining Estimate - 0 minutes
              0m
              Logged:
              Time Spent - 1 hour, 30 minutes Time Not Required
              1h 30m

                Agile