New errors when moving to new server (w/ ez 3.7)

Author Message

André R.

Tuesday 27 December 2005 6:37:13 am

Trying to set up some websites on a new server with ez 3.7, but are seeing some new issues that we did not have on our 3.6.3 server. One is not being able to use the rewrite rules, but from the php changelog (4.4.2rc1). Php might be our problem there. Other issues:

1: code: {if $node.object.data_map.oppdragsgiver.content.is_empty|not}
error: "Cannot retrieve attribute of a string"

2: code: {if eq($module_result.path, 2)}
error: does not seem to work, using gt does.

3: code: TemplateCompile=enabled
error: Fatal error or just blank page if your lucky...

Server:
ez: 3.7.3 rev. 13943 (downloaded & tested today to see if the error where fixed from 3.7.2)
php: 4.4.0 w/ APC 3.0.8
Apache: 2.0.54

eZ Online Editor 5: http://projects.ez.no/ezoe || eZJSCore (Ajax): http://projects.ez.no/ezjscore || eZ Publish EE http://ez.no/eZPublish/eZ-Publish-Enterprise-Subscription
@: http://twitter.com/andrerom

Bertrand Dunogier

Tuesday 27 December 2005 12:45:51 pm

2: code: {if eq($module_result.path, 2)}
error: does not seem to work, using gt does.

I can probably answer that one : there's no reason why it would work... $module_result.path is an array, you'd be very lucky if it was == 2. > 2 might work.

You're probably looking for $module_result.node_id or $module_result.path[index].node_id.

André R.

Thursday 29 December 2005 9:09:38 am

So how do I count array.lenght then ??
Because this worked fine on our other server, and what is written in the documentation on gt():

http://ez.no/doc/ez_publish/technical_manual/3_6/reference/template_operators/logical_operations/gt

I'd suggest there is something wrong..

eZ Online Editor 5: http://projects.ez.no/ezoe || eZJSCore (Ajax): http://projects.ez.no/ezjscore || eZ Publish EE http://ez.no/eZPublish/eZ-Publish-Enterprise-Subscription
@: http://twitter.com/andrerom

Hans Melis

Thursday 29 December 2005 2:16:18 pm

About your other issues:

1) The error means that the result of .content is a string and not an object/array with the attribute/entry 'is_empty'. Try removing the .content in the comparison:

{if $node.object.data_map.oppdragsgiver.is_empty|not}

2) It's not because gt() can compare with an array, that eq() can do the same. The documentation of eq() doesn't mention that arrays as input will be converted to their length. To do explicit length checks, use the following code:

{if count( $module_result.path )|eq( 2 )}

3) This most likely means there are errors in the template code which result in invalid PHP code as soon as compilation is enabled. Try to use the template checking script in bin\php\eztemplatecheck.php and check each template marked as invalid by the script.

Hans
http://blog.hansmelis.be

André R.

Tuesday 03 January 2006 6:35:29 am

Thanks #1 and #2 worked.

But it did not help with the fatal error.
I have saved the output so you can see it:

http://144.164.240.1/fatal.htm

These errors occure when i activate TemplateCompile.

eZ Online Editor 5: http://projects.ez.no/ezoe || eZJSCore (Ajax): http://projects.ez.no/ezjscore || eZ Publish EE http://ez.no/eZPublish/eZ-Publish-Enterprise-Subscription
@: http://twitter.com/andrerom

Daniel Guerrier

Tuesday 03 January 2006 7:00:10 am

Check this thread out.
http://ez.no/community/forum/install_configuration/site_migration_windows_linux

I can understand your pain, it seems as if no one gives a straight answer until the answer is no longer needed.

André R.

Tuesday 03 January 2006 8:16:49 am

Possible similar problem, but it only shows up when I use TemplateCompile=enable, was that your case as well??

Hans:
3) This most likely means there are errors in the template code which result in invalid PHP code as soon as compilation is enabled. Try to use the template checking script in bin\php\eztemplatecheck.php and check each template marked as invalid by the script.

How do I do this??

eZ Online Editor 5: http://projects.ez.no/ezoe || eZJSCore (Ajax): http://projects.ez.no/ezjscore || eZ Publish EE http://ez.no/eZPublish/eZ-Publish-Enterprise-Subscription
@: http://twitter.com/andrerom

André R.

Monday 16 January 2006 11:44:28 am

Fixed the Fatal error by moving the settings(TemplateCompile=enabled & TemplateOptimization=enabled) from override/site.ini.append.php to the site.ini.append.php file of alle the siteaccess'es..

A bit strange is it ??

eZ Online Editor 5: http://projects.ez.no/ezoe || eZJSCore (Ajax): http://projects.ez.no/ezjscore || eZ Publish EE http://ez.no/eZPublish/eZ-Publish-Enterprise-Subscription
@: http://twitter.com/andrerom

Powered by eZ Publish™ CMS Open Source Web Content Management. Copyright © 1999-2014 eZ Systems AS (except where otherwise noted). All rights reserved.