Details
-
Bug
-
Resolution: Fixed
-
Medium
-
None
-
None
-
eZ Publish 4.7
eZ Recommendation 1.1
Description
The incremental content export worflow causes errors when trying to publish a content object of a class which contains the recommendation attribute.
Steps to reproduce:
- Install eZ Recommendation 1.1
- Create a new content class, or edit an existing one, adding a 'Recommendation' attribute
- Create a new workflow with a 'ezrecommendation export object event' event
- Add your workflow to the content / publish / before workflow trigger
- Create a new content object of your content class (the one you just created/edited)
- Hit the 'Send for publish' button
You should get the following errors in error.log:
(...) [ Dec 12 2012 14:05:19 ] [192.168.2.89] eZContentObjectAttribute::attribute: Attribute 'data_int' does not exist [ Dec 12 2012 14:05:19 ] [192.168.2.89] eZContentObjectAttribute::attribute: Attribute 'data_int' does not exist [ Dec 12 2012 14:05:20 ] Unexpected error, the message was : Unexpected HTTP code in /var/www/ezp470/extension/ezrecommendation/classes/ezrecofunctions.php on line 356
If you increase the debug detail you will also get the following notices in notice.log:
[ Dec 12 2012 14:05:19 ] [192.168.2.89] eZMySQLiDB[Localhost via UNIX socket, on master]::query(0 rows, 0.228 ms) query number per page:58: UPDATE ezcontentobject_attribute SET language_id=2, contentclassattribute_id=366, attribute_original_id=0, sort_key_int=0, sort_key_string='', data_type_string='ezrecommendation', data_text='<?xml version="1.0" encoding="utf-8"?>n<mapping><counter value="12"/><validfrom value="publish_date"/><validto value="unpublish_date"/><title value="title"/><abstract value="short_title"/><author value="author"/><newsagency value="author"/><vendor value="author"/><geolocation value="tags"/><date value="publish_date"/><tags value="tags"/><export-enable value="1"/><recommendation-enable value="1"/><itemtypeid value="2"/></mapping>n', data_int=NULL, data_float=0.000000 WHERE id='1295' AND contentobject_id='206' AND version='1' AND language_code='eng-GB' [ Dec 12 2012 14:05:19 ] [192.168.2.89] PHP: E_NOTICE: Undefined offset: 0 in /var/www/ezp470/extension/ezrecommendation/eventtypes/event/ezrecoexportevent/ezrecoexporteventtype.php on line 291 [ Dec 12 2012 14:05:19 ] [192.168.2.89] PHP: E_NOTICE: Trying to get property of non-object in /var/www/ezp470/extension/ezrecommendation/eventtypes/event/ezrecoexportevent/ezrecoexporteventtype.php on line 126 [ Dec 12 2012 14:05:19 ] [192.168.2.89] PHP: E_NOTICE: Trying to get property of non-object in /var/www/ezp470/extension/ezrecommendation/classes/ezrecodatatypestringcontent.php on line 71
And the following in warning.log:
[ Dec 12 2012 14:05:19 ] [192.168.2.89] PHP: E_WARNING: implode(): Invalid arguments passed in /var/www/ezp470/extension/ezrecommendation/classes/ezrecodatatypestringcontent.php on line 71