Unable to add object to eZFlow Block after 4.1.0 Update

Author Message

Michael Fürst

Wednesday 18 March 2009 1:31:19 pm

Hi,

After updating to 4.1.0 I'm unable to add object to an eZFlow Block in Backend.
When I click on "Add Item", then select an article and add it, the block still is empty.
Other functions (like adding a block) work without any problem.

Has anyone an idea??

Thanks in advance,
regards,
Mike

Georg Franz

Wednesday 18 March 2009 3:27:41 pm

Hi,

probably this is related to this bug:
http://issues.ez.no/IssueView.php?Id=14485&activeItem=7

Best wishes,
Georg.

--
http://www.schicksal.com Horoskop website which uses eZ Publish since 2004

Michael Fürst

Thursday 19 March 2009 2:05:57 am

Hi Georg,

Nope, that fix doesn't work.
The first bug (i reported this one already some time ago) is fixed in the actual release. But the bug with adding objects to a block, is already there after adding your two lines of code.

In eZFlow Release 1.1-0 it's in Line ~724 of <b>/extensions/ezflow/datatypes/ezpage/ezpagetype.php.</b>

The Case now looks like this, but the problem isn't solved :(

case 'custom_attribute':
                $page = $contentObjectAttribute->content();
                $zone = $page->getZone( $params[1] );
                $block = $zone->getBlock( $params[2] );

                if ( !$http->hasPostVariable( 'BrowseCancelButton' ) )
                {
                    if ( $http->hasPostVariable( 'SelectedNodeIDArray' ) )
                    {
                        $selectedNodeIDArray = $http->postVariable ('SelectedNodeIDArray' );
                        $customAttributes[$params[3]] = $selectedNodeIDArray[0];
                    }

                    $block->setAttribute( 'custom_attributes', $customAttributes );
                    
                    // BUGFIX, related to http://issues.ez.no/IssueView.php?Id=14485&activeItem=7
                    $contentObjectAttribute->setContent($page);
					$contentObjectAttribute->store();
                    
                }
                break;

I think that is really a major bug for everyone who upgrades to eZPublish 4.1.0 and uses eZFlow, cause you are unable to publish content on frontpages...

I hope there will be a fix available as soon as possible or we can find another solution...

Maybe the error message "The total number of zones in the new layout is less than the number of zones in the previous layout. Therefore, you must map the previous zones to new zones. Unmapped zones will be removed!" in the zone view can help us!?

Ciao,
Mike

Michael Fürst

Thursday 19 March 2009 3:32:06 am

Ok, I'm debuging at the moment.
Whar I found out till now:
When you add a new item (object) to a block, the case tree "new_item" in the ezpagetype::customObjectAttributeHTTPAction method is called (not "custom_attribute")

Łukasz Serwatka

Thursday 19 March 2009 10:50:52 am

Hi Mike,

I have attached patch to the issue http://issues.ez.no/14485. The updated packages are online now, thus you can re-run upgrade script from 4.1. Remember about backup ;)

As the issue with adding items to block affecting only 1.1 series, the update for eZ Flow 1.0 will release with eZ Publish 4.0.4 where problem with custom attributes is resolved too.

Personal website -> http://serwatka.net
Blog (about eZ Publish) -> http://serwatka.net/blog

Michael Fürst

Thursday 19 March 2009 2:06:14 pm

Hi Lukasz!

Great, bug is fixed and everything seems to work fine now!
Gratulations, really great work ;)

Thanks & Bye,
Mike

A Fowler

Friday 05 June 2009 8:16:17 pm

I found this thread by searching for the message "The total number of zones in the new layout is less than the number of zones in the previous layout. Therefore, you must map the previous zones to new zones. Unmapped zones will be removed!"

It doesn't look exactly like the same issue, but it could be related. I found that in my code, the two patches from http://issues.ez.no/14485 are already applied. (I have 4.1.1 and eZ Flow 1.1, I believe). So I can't figure out why I am seeing this error message.

Basically, when I edit the Home object, of class Frontpage, it always shows me the error message "The total number of zones in the new layout is less than the number of zones in the previous layout. Therefore, you must map the previous zones to new zones. Unmapped zones will be removed!" It does not show the tabs for the zones at all below that. No matter what I do, I cannot get past this. If I select a new layout, it doesn't remove the message. If I publish the object and go in to edit it again, I still see the message. If I discard the draft and edit again, it's still there. If I restore the database from a backup I made some time ago when I wasn't seeing this issue, I still see it now.

Looking at the page source, it seems that a bit of JavaScript is employed to put the tabs there for the different zones. But the script must not be running or completing properly, and I'm not yet skilled enough in JavaScript to figure out why.

My latest clue is that on the Error Console in Firefox, I see this:

"Error: YAHOO is not defined
Source File: http://admin.robinsonandlong.doesntexist.com:7456/extension/ezflow/design/standard/javascript/blocktools.js
Line: 1"

And the same error is repeated three more times with other files.

Any ideas how to fix this? Much appreciated!

Łukasz Serwatka

Saturday 06 June 2009 12:33:12 am

Did you read the eZ Flow setup guide[1]? It looks like you are missing a re-write rule:

^/extension/[^/]+/design/[^/]+/(stylesheets|flash|images|lib|javascripts?)/.* - [L]

[1] http://ez.no/doc/content/download/24948/102690/version/3/file/ezflow_setup-1.1.pdf

Personal website -> http://serwatka.net
Blog (about eZ Publish) -> http://serwatka.net/blog

A Fowler

Wednesday 10 June 2009 12:59:47 pm

Thank you, I missed that. This seems to have fixed the problem!

The rewrite rule I had was:

^/extension/[^/]+/design/[^/]+/(stylesheets|images|javascripts?)/.* - [L]

Which I believe I copied from somewhere in the documentation on this site. The problem was that the "lib" directory, where the YUI code is located, was not included. The path "extension/ezflow/design/standard/lib/yui/2.6.0/build/utilities/utilities.js" was not loading, so the YAHOO variable was not getting initialized.

Your suggested rewrite rule fixed the problem.

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

eZ debug

Timing: Jan 18 2025 11:42:59
Script start
Timing: Jan 18 2025 11:42:59
Module start 'layout'
Timing: Jan 18 2025 11:42:59
Module start 'content'
Timing: Jan 18 2025 11:43:00
Module end 'content'
Timing: Jan 18 2025 11:43:00
Script end

Main resources:

Total runtime0.9996 sec
Peak memory usage4,096.0000 KB
Database Queries79

Timing points:

CheckpointStart (sec)Duration (sec)Memory at start (KB)Memory used (KB)
Script start 0.00000.0074 588.1563152.6563
Module start 'layout' 0.00740.0029 740.812539.5078
Module start 'content' 0.01020.9880 780.3203708.4688
Module end 'content' 0.99820.0013 1,488.789124.1094
Script end 0.9996  1,512.8984 

Time accumulators:

 Accumulator Duration (sec) Duration (%) Count Average (sec)
Ini load
Load cache0.00340.3397160.0002
Check MTime0.00150.1465160.0001
Mysql Total
Database connection0.00120.119910.0012
Mysqli_queries0.902090.2343790.0114
Looping result0.00080.0799770.0000
Template Total0.959296.020.4796
Template load0.00460.456720.0023
Template processing0.954695.502420.4773
Template load and register function0.00010.010310.0001
states
state_id_array0.00090.088910.0009
state_identifier_array0.00120.117320.0006
Override
Cache load0.00350.3455690.0001
Sytem overhead
Fetch class attribute can translate value0.00070.065440.0002
Fetch class attribute name0.00160.1609120.0001
XML
Image XML parsing0.00170.172740.0004
class_abstraction
Instantiating content class attribute0.00000.0034160.0000
General
dbfile0.00110.1147300.0000
String conversion0.00000.000740.0000
Note: percentages do not add up to 100% because some accumulators overlap

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
7content/datatype/view/ezimage.tpl<No override>extension/sevenx/design/simple/templates/content/datatype/view/ezimage.tplEdit templateOverride template
9content/datatype/view/ezxmltext.tpl<No override>extension/community_design/design/suncana/templates/content/datatype/view/ezxmltext.tplEdit templateOverride template
20content/datatype/view/ezxmltags/paragraph.tpl<No override>extension/ezwebin/design/ezwebin/templates/content/datatype/view/ezxmltags/paragraph.tplEdit templateOverride template
9content/datatype/view/ezxmltags/line.tpl<No override>design/standard/templates/content/datatype/view/ezxmltags/line.tplEdit templateOverride template
3content/datatype/view/ezxmltags/literal.tpl<No override>extension/community/design/standard/templates/content/datatype/view/ezxmltags/literal.tplEdit templateOverride template
1print_pagelayout.tpl<No override>extension/community/design/community/templates/print_pagelayout.tplEdit templateOverride template
 Number of times templates used: 50
 Number of unique templates used: 7

Time used to render debug report: 0.0001 secs