Forums / Install & configuration / "parse error, unexpected T_ELSE in" after 3.4.1 upgrade

"parse error, unexpected T_ELSE in" after 3.4.1 upgrade

Author Message

Stephan Brezinsky

Wednesday 01 September 2004 12:24:15 pm

After upgrading from 3.3-4 to 3.4.1 latest stable build I get the following error on any page with a custom view template e.g. {attribute_view_gui view=custom_view}

The error is as follows:
Parse error: parse error, unexpected T_ELSE in /usr/home/encase/public_html/encasepub/var/encasement/cache/template/compiled/full_view_manual_folder-4db1f454d8f091a60a68d458a5fe24e2.php on line 525
Fatal error: eZ publish did not finish it's request

I have posted this bug twice in the bugs forum with no reply from anyone, so I am once again pleading for someone to help me. This bug has rendered my entire site useless, and I'm not going to sit here and debug the entire ezpub kernel (i just dont have that kind of time). So please, I am begging for help. Someone?

Paul Borgermans

Wednesday 01 September 2004 12:54:28 pm

Hi

Have seen this too, after clearign the cache by hand and template recompile it was gone.

-paul

eZ Publish, eZ Find, Solr expert consulting and training
http://twitter.com/paulborgermans

Stephan Brezinsky

Wednesday 01 September 2004 2:56:36 pm

I have cleared the cache manually several times, and then allowed the system to recompile the templates autmatically and that hasnt worked. Are you recompiling them manually?

Paul Borgermans

Wednesday 01 September 2004 3:03:29 pm

Yes, I used the eztc.php script. Some other note: I also did a further upgrade of the stable branch on svn a few weeks ago. So in my case it was not just a plain install, but somewhere between 3.4.1 and 3.4.2

-paul

eZ Publish, eZ Find, Solr expert consulting and training
http://twitter.com/paulborgermans

Stephan Brezinsky

Wednesday 01 September 2004 6:06:36 pm

well that didnt make a difference at all. I emptied the cache and ran the eztc.php script (which took an incredibly large amount of work), and it compiled succesfully. Not only did that cause the stylesheets to not load properly, but the bug is still present. Same exact error now.

Short of downgrading to 3.3-4 I am running out of options.

Björn Dieding@xrow.de

Wednesday 01 September 2004 8:06:37 pm

an idea:
go to the complieled tempalte

full_view_manual_folder-4db1f454d8f091a60a68d458a5fe24e2.php

check what part of eZ is failing (maybe a operator)

write the code

so the this error does not occur

Looking for a new job? http://www.xrow.com/xrow-GmbH/Jobs
Looking for hosting? http://hostingezpublish.com
-----------------------------------------------------------------------------
GMT +01:00 Hannover, Germany
Web: http://www.xrow.com/

Stephan Brezinsky

Wednesday 01 September 2004 10:17:42 pm

I would edit the compiled template, but it does that to EVERY template that uses a custom view. Since I have many page templates that use many different custom views, we are talking about the possibility of dozens of compiled templates.

I know exactly what the php error is, there is an extra "Else" statement without a closing bracket. an example:

else
{

$resourceFound = false;
if ( file_exists( "var/encasement/cache/template/compiled/pdf_file-a56d5932f7a9bf227184dd9f9e3b9fe8.php" ) )
{

As you can see, there is missing a } bracket. This is clearly a problem with the caching engine, and like I said before, I cannot manually edit and rebuild cached files every single time the content changes. It is just too time consuming (and defeats the point of a CMS).

One again, I am desperate for help :(

shawn christenson

Thursday 09 September 2004 2:28:05 pm

Well, short of rolling back (which we do not wish to do) is there anyone willing to fix this problem for some money sent to their paypal account?

Paul Forsyth

Thursday 09 September 2004 11:26:03 pm

One thing, attribute_view_gui doesnt take the view parameter. See the doco for the syntax:

http://ez.no/ez_publish/documentation/reference/template_functions/gui/attribute_view_gui

Where is your custom_view template located? Is it an override or do you really want it to be used as an alternative view.

This does sound like an eZ bug in some way since php shouldnt fail like this on template code. Which version of php are you using?

paul

K259

Monday 13 September 2004 3:01:55 pm

Shawn, send me your email-address at: post[at]zapto[dot]no

Frederik Holljen

Tuesday 14 September 2004 2:31:05 am

We suspect this error to be fixed in 3.4.2 (even if we can't actually reproduce it here). Can you all try upgrading to svn/stable and see if the problem persists?

Kim Marshall

Friday 17 September 2004 6:07:28 pm

I've just had the same error on a fresh install 3.4.1 (7051).

It's a very nasty one.

I don't think your probelm is caused by the upgrade path and you shouldn't need to upgrade to resolve it.

Anyway here's what I did to fix it I hope it works for you too.

http://ez.no/community/bug_reports/custom_view_templates_and_3_4_1_upgrade

Jan Borsodi

Monday 20 September 2004 4:41:06 am

We are having a hard time reproducing this problem.
Could you send the template file and override file(s) to the info email address (found on contact information page)?
With this it is much easier to figure out what is wrong.
We will need to the template file that has the <i>attribute_view_gui</i> and the template file for the attribute.

It could also be a good idea to check your override settings, I've noticed something similar earlier which occured when the override settings were invalid (point to non-existing file etc.).

--
Amos

Documentation: http://ez.no/ez_publish/documentation
FAQ: http://ez.no/ez_publish/documentation/faq

eZ debug

Timing: Jan 18 2025 14:56:27
Script start
Timing: Jan 18 2025 14:56:27
Module start 'content'
Timing: Jan 18 2025 14:56:28
Module end 'content'
Timing: Jan 18 2025 14:56:29
Script end

Main resources:

Total runtime1.4011 sec
Peak memory usage4,096.0000 KB
Database Queries238

Timing points:

CheckpointStart (sec)Duration (sec)Memory at start (KB)Memory used (KB)
Script start 0.00000.0069 587.9609180.8047
Module start 'content' 0.00691.1814 768.7656915.6484
Module end 'content' 1.18830.2127 1,684.4141353.3125
Script end 1.4011  2,037.7266 

Time accumulators:

 Accumulator Duration (sec) Duration (%) Count Average (sec)
Ini load
Load cache0.00430.3059210.0002
Check MTime0.00150.1056210.0001
Mysql Total
Database connection0.00110.079710.0011
Mysqli_queries1.301492.88172380.0055
Looping result0.00290.20512360.0000
Template Total1.361297.120.6806
Template load0.00170.123020.0009
Template processing1.359497.024720.6797
Template load and register function0.00020.011810.0002
states
state_id_array0.00220.157710.0022
state_identifier_array0.00130.096220.0007
Override
Cache load0.00150.1091660.0000
Sytem overhead
Fetch class attribute can translate value0.00150.1055100.0001
Fetch class attribute name0.00110.0799170.0001
XML
Image XML parsing0.00280.1963100.0003
class_abstraction
Instantiating content class attribute0.00000.0020180.0000
General
dbfile0.00470.3381470.0001
String conversion0.00000.000530.0000
Note: percentages do not add up to 100% because some accumulators overlap

CSS/JS files loaded with "ezjscPacker" during request:

CacheTypePacklevelSourceFiles
CSS0extension/community/design/community/stylesheets/ext/jquery.autocomplete.css
extension/community_design/design/suncana/stylesheets/scrollbars.css
extension/community_design/design/suncana/stylesheets/tabs.css
extension/community_design/design/suncana/stylesheets/roadmap.css
extension/community_design/design/suncana/stylesheets/content.css
extension/community_design/design/suncana/stylesheets/star-rating.css
extension/community_design/design/suncana/stylesheets/syntax_and_custom_tags.css
extension/community_design/design/suncana/stylesheets/buttons.css
extension/community_design/design/suncana/stylesheets/tweetbox.css
extension/community_design/design/suncana/stylesheets/jquery.fancybox-1.3.4.css
extension/bcsmoothgallery/design/standard/stylesheets/magnific-popup.css
extension/sevenx/design/simple/stylesheets/star_rating.css
extension/sevenx/design/simple/stylesheets/libs/fontawesome/css/all.min.css
extension/sevenx/design/simple/stylesheets/main.v02.css
extension/sevenx/design/simple/stylesheets/main.v02.res.css
JS0extension/ezjscore/design/standard/lib/yui/3.17.2/build/yui/yui-min.js
extension/ezjscore/design/standard/javascript/jquery-3.7.0.min.js
extension/community_design/design/suncana/javascript/jquery.ui.core.min.js
extension/community_design/design/suncana/javascript/jquery.ui.widget.min.js
extension/community_design/design/suncana/javascript/jquery.easing.1.3.js
extension/community_design/design/suncana/javascript/jquery.ui.tabs.js
extension/community_design/design/suncana/javascript/jquery.hoverIntent.min.js
extension/community_design/design/suncana/javascript/jquery.popmenu.js
extension/community_design/design/suncana/javascript/jScrollPane.js
extension/community_design/design/suncana/javascript/jquery.mousewheel.js
extension/community_design/design/suncana/javascript/jquery.cycle.all.js
extension/sevenx/design/simple/javascript/jquery.scrollTo.js
extension/community_design/design/suncana/javascript/jquery.cookie.js
extension/community_design/design/suncana/javascript/ezstarrating_jquery.js
extension/community_design/design/suncana/javascript/jquery.initboxes.js
extension/community_design/design/suncana/javascript/app.js
extension/community_design/design/suncana/javascript/twitterwidget.js
extension/community_design/design/suncana/javascript/community.js
extension/community_design/design/suncana/javascript/roadmap.js
extension/community_design/design/suncana/javascript/ez.js
extension/community_design/design/suncana/javascript/ezshareevents.js
extension/sevenx/design/simple/javascript/main.js

Templates used to render the page:

UsageRequested templateTemplateTemplate loadedEditOverride
1node/view/full.tplfull/forum_topic.tplextension/sevenx/design/simple/override/templates/full/forum_topic.tplEdit templateOverride template
13content/datatype/view/ezxmltext.tpl<No override>extension/community_design/design/suncana/templates/content/datatype/view/ezxmltext.tplEdit templateOverride template
16content/datatype/view/ezxmltags/paragraph.tpl<No override>extension/ezwebin/design/ezwebin/templates/content/datatype/view/ezxmltags/paragraph.tplEdit templateOverride template
5content/datatype/view/ezxmltags/line.tpl<No override>design/standard/templates/content/datatype/view/ezxmltags/line.tplEdit templateOverride template
5content/datatype/view/ezimage.tpl<No override>extension/sevenx/design/simple/templates/content/datatype/view/ezimage.tplEdit templateOverride template
1pagelayout.tpl<No override>extension/sevenx/design/simple/templates/pagelayout.tplEdit templateOverride template
 Number of times templates used: 41
 Number of unique templates used: 6

Time used to render debug report: 0.0001 secs