approval circuit, lost the locations of objects!

Author Message

Lucas Aguilar

Friday 08 April 2011 4:45:28 am

The version of eZpublish I use is 4.0.1. I have implemented a portal circuit approval for publication. The issue is that when refused (refusal) for the first time a content, it has never lost or location in the tree and the system asks me to assign one.
how I can fix this so do not miss the starting location of the object created.

from already thank you very much
Lucas .-

Lucas Aguilar

Monday 11 April 2011 8:23:54 am

Anyone please?
I applied ezapprove2 extension and this does not work correctly, like I do not endorse the content when I press "approve" any help?

Lucas Aguilar

Wednesday 13 April 2011 5:00:57 am

solutions!:

in the file, attribute_edit.php:

// If there are no locations we need to browse for one.
if( $locationCount < 1 && $Module->isCurrentAction( 'Publish' ) )
{
/*
* Modificando: aca le voy a asignar el nodo al objeto si lo encuentro en la tabla
* eznode_assignment, pasos:
*
* 1) obtener el nodo original de la tabla eznode_assignment
*/

include_once 'kernel/classes/eznodeassignment.php';
$obj_eznode_assignment = & eZNodeAssignment::fetchForObject($object->ID);
//echo '<pre>';
//print_r($obj_eznode_assignment);
//echo '</pre>';
//si tiene un nodo asignado en la eznode_assignment
if (count($obj_eznode_assignment) > 0) {
//2) instanciar el ezcontenttree
$obj_eZContentObjectTreeNode = & eZContentObjectTreeNode::create($obj_eznode_assignment->ParentNode,$object->ID);
//echo '<pre>';
//print_r($obj_eZContentObjectTreeNode);
//echo '</pre>';

//guardo la ubicacion en la base de datos
$obj_eZContentObjectTreeNode->store();

//die;
}
else
/*
* hace lo que hacia antes
*/
// if ( $object->attribute( 'status' ) == eZContentObject::STATUS_DRAFT )
{
$Module->setCurrentAction( 'BrowseForPrimaryNodes' );
// Store currentAction
$http->setSessionVariable( 'LastCurrentAction', 'Publish' );
// Store post vars
$http->setSessionVariable( 'BrowseForNodes_POST', $_POST );
}
}

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 02:10:47
Script start
Timing: Jan 18 2025 02:10:47
Module start 'layout'
Timing: Jan 18 2025 02:10:47
Module start 'content'
Timing: Jan 18 2025 02:10:47
Module end 'content'
Timing: Jan 18 2025 02:10:47
Script end

Main resources:

Total runtime0.6874 sec
Peak memory usage4,096.0000 KB
Database Queries55

Timing points:

CheckpointStart (sec)Duration (sec)Memory at start (KB)Memory used (KB)
Script start 0.00000.0057 589.1641152.6406
Module start 'layout' 0.00570.0023 741.804739.4844
Module start 'content' 0.00800.6779 781.2891444.6719
Module end 'content' 0.68580.0015 1,225.960912.1250
Script end 0.6874  1,238.0859 

Time accumulators:

 Accumulator Duration (sec) Duration (%) Count Average (sec)
Ini load
Load cache0.00340.4954160.0002
Check MTime0.00160.2277160.0001
Mysql Total
Database connection0.00070.097210.0007
Mysqli_queries0.638092.8129550.0116
Looping result0.00050.0667530.0000
Template Total0.658195.720.3290
Template load0.00200.295420.0010
Template processing0.656095.429720.3280
Template load and register function0.00020.023710.0002
states
state_id_array0.00080.119910.0008
state_identifier_array0.00150.214420.0007
Override
Cache load0.00170.2464550.0000
Sytem overhead
Fetch class attribute can translate value0.00130.182910.0013
Fetch class attribute name0.00130.192330.0004
XML
Image XML parsing0.00020.022110.0002
class_abstraction
Instantiating content class attribute0.00000.001730.0000
General
dbfile0.00080.1119100.0001
String conversion0.00000.001140.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
3content/datatype/view/ezxmltext.tpl<No override>extension/community_design/design/suncana/templates/content/datatype/view/ezxmltext.tplEdit templateOverride template
3content/datatype/view/ezxmltags/line.tpl<No override>design/standard/templates/content/datatype/view/ezxmltags/line.tplEdit templateOverride template
4content/datatype/view/ezxmltags/paragraph.tpl<No override>extension/ezwebin/design/ezwebin/templates/content/datatype/view/ezxmltags/paragraph.tplEdit templateOverride template
1print_pagelayout.tpl<No override>extension/community/design/community/templates/print_pagelayout.tplEdit templateOverride template
 Number of times templates used: 12
 Number of unique templates used: 5

Time used to render debug report: 0.0001 secs