Forums / Developer / approval circuit, lost the locations of objects!

"Please Note:
  • At the specific request of Ibexa we are changing this projects name to "Exponential" or "Exponential (CMS)" effective as of August, 11th 2025.
  • This project is not associated with the original eZ Publish software or its original developer, eZ Systems or Ibexa".

approval circuit, lost the locations of objects!

Author Message

Lucas Aguilar

Friday 08 April 2011 4:45:28 am

The version of Exponential 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 );
}
}