Help changing the parent node of an object.

Author Message

Tamaki Hodge

Tuesday 08 August 2006 8:42:30 pm

I recently upgraded a large intranet based on eZpublish from version 3.4 to version 3.8.

However I have noticed one key feature no longer works.

When I edit an existing item I can no longer change the parent node of the item. To do this I set the SetPlacementNodeIDArray[] and MainNodeID to the nodeid of the new parent node.

E.g.
<input type="hidden"
name="SetPlacementNodeIDArray[]"
value="{$newparentnodeid}" />

<input type="hidden"
name="MainNodeID"
value="{$newparentnodeid}" />

These fields work when I am creating a new object, however they don't seem to work when editing an existing item.

Can someone please confirm weather or not they use similar code in their edit templates and weather it works in eZpublish 3.8?

Kristof Coomans

Tuesday 08 August 2006 10:34:55 pm

Welcome to the eZ community!

This could be related to http://ez.no/bugs/view/8438 , but I'm not sure. Please try the attached patch and tell us if it works now.

independent eZ Publish developer and service provider | http://blog.coomanskristof.be | http://ezpedia.org

Tamaki Hodge

Wednesday 09 August 2006 3:21:14 pm

Thanks for the suggestion.

I applied the patch, however I still have the same problem.

Any ideas?

Kristof Coomans

Wednesday 09 August 2006 10:26:48 pm

In kernel/content/node_edit.php, on line 251:

// If the object has been previously published we do not allow node assignment operations
if ( $object->attribute( 'status' ) != EZ_CONTENT_OBJECT_STATUS_DRAFT )
{
    return;
}

I'm afraid it's the expected behavior. The code came in together with the new multilingual features on trunk svn rev. 15370.

independent eZ Publish developer and service provider | http://blog.coomanskristof.be | http://ezpedia.org

Tamaki Hodge

Thursday 10 August 2006 3:22:20 pm

Thanks.

Would it be a good idea to remove this if statement?

Or should I just write an extension that takes care of it?

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 18:29:51
Script start
Timing: Jan 18 2025 18:29:51
Module start 'layout'
Timing: Jan 18 2025 18:29:51
Module start 'content'
Timing: Jan 18 2025 18:29:52
Module end 'content'
Timing: Jan 18 2025 18:29:52
Script end

Main resources:

Total runtime0.9069 sec
Peak memory usage4,096.0000 KB
Database Queries63

Timing points:

CheckpointStart (sec)Duration (sec)Memory at start (KB)Memory used (KB)
Script start 0.00000.0051 588.0391152.6406
Module start 'layout' 0.00510.0034 740.679739.4766
Module start 'content' 0.00850.8969 780.1563556.6563
Module end 'content' 0.90540.0015 1,336.812512.1250
Script end 0.9069  1,348.9375 

Time accumulators:

 Accumulator Duration (sec) Duration (%) Count Average (sec)
Ini load
Load cache0.00360.3925160.0002
Check MTime0.00160.1749160.0001
Mysql Total
Database connection0.00070.072010.0007
Mysqli_queries0.852193.9502630.0135
Looping result0.00060.0647610.0000
Template Total0.877596.820.4388
Template load0.00210.232320.0011
Template processing0.875496.522820.4377
Template load and register function0.00020.020810.0002
states
state_id_array0.00090.094610.0009
state_identifier_array0.00130.141220.0006
Override
Cache load0.00180.2008330.0001
Sytem overhead
Fetch class attribute can translate value0.00060.068520.0003
Fetch class attribute name0.00110.117160.0002
XML
Image XML parsing0.00070.076620.0003
class_abstraction
Instantiating content class attribute0.00000.001870.0000
General
dbfile0.00080.0902160.0001
String conversion0.00000.000840.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
5content/datatype/view/ezxmltext.tpl<No override>extension/community_design/design/suncana/templates/content/datatype/view/ezxmltext.tplEdit templateOverride template
7content/datatype/view/ezxmltags/paragraph.tpl<No override>extension/ezwebin/design/ezwebin/templates/content/datatype/view/ezxmltags/paragraph.tplEdit templateOverride template
1content/datatype/view/ezxmltags/line.tpl<No override>design/standard/templates/content/datatype/view/ezxmltags/line.tplEdit templateOverride template
2content/datatype/view/ezimage.tpl<No override>extension/sevenx/design/simple/templates/content/datatype/view/ezimage.tplEdit templateOverride template
1content/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: 18
 Number of unique templates used: 7

Time used to render debug report: 0.0002 secs