Publish article to multiple nodes? (#2)

Author Message

Marko Žmak

Sunday 15 May 2005 6:24:27 am

This question was already asked on the forum, but what I got form the answers didn't work.

I'd like to publish an object to several nodes but using only one form. NOT by using "Add locations" button, but by selecting locations from a drop down menu in the form.

I tried to implement it by using the following form variables:

SetPlacementNodeIDArray[]
SetRemoteIDOrderMap[]
SetRemoteIDFieldMap[]

but id doesn't work. The object is published only to the first node specified by SetPlacementNodeIDArray[], the other nodes are just ignored.

Does anyone know the sollution to this problem?

--
Nothing is impossible. Not if you can imagine it!

Hubert Farnsworth

Marko Žmak

Tuesday 17 May 2005 2:42:49 am

Does anyone have any answer to this problem?

--
Nothing is impossible. Not if you can imagine it!

Hubert Farnsworth

Bruce Morrison

Monday 23 May 2005 4:14:01 pm

Hi Marko

I have used these form variables sucessfully in versions of ezPublish prior to the 3.5 series. However there seems to be some changes in how this is hanled in the 3.5 series. This is likely to be due to the fact that the node location functionallity has moved from the object editing screen.

After a quick look at the source code (hint hint :) it appears that the varaible useNodeAssigments must be set to 1 for these variables to be used (it is set to 0 by default).

The following variables must also be set or the placement will fail:
+ MainNodeID
+ SortOrderMap
+ SortFieldMap

The function to look at is storeNodeAssignments starting at line 226 of kernel/content/node_edit.php

At this point in time I have not tested this functionallity, only looked at the source.

Cheers
bruce

My Blog: http://www.stuffandcontent.com/
Follow me on twitter: http://twitter.com/brucemorrison
Consolidated eZ Publish Feed : http://friendfeed.com/rooms/ez-publish

Marko Žmak

Monday 23 May 2005 4:19:16 pm

What is the purpose of this variables:

+ SortOrderMap
+ SortFieldMap

I saw them in edit_placement.tpl but it seems to me that they are used to browse for additional locations, not to set them.

--
Nothing is impossible. Not if you can imagine it!

Hubert Farnsworth

Bruce Morrison

Tuesday 24 May 2005 4:24:38 pm

+ SortOrderMap
+ SortFieldMap

I believe they are used to set the ordering of the newly created node (how the children of the newly created node will be ordered).

Cheers
Bruce

My Blog: http://www.stuffandcontent.com/
Follow me on twitter: http://twitter.com/brucemorrison
Consolidated eZ Publish Feed : http://friendfeed.com/rooms/ez-publish

kracker (the)

Tuesday 24 May 2005 11:23:24 pm

Ahh, Thank you Bruce!

Your explanation of the SortOrderMap and SortFieldMap make a lot of sense and clarify the last little bit I did not understand the first time around.

While I've not used this functionality yet, I believe in it and urge anyone else trying to use it to read the applicable kernel/ source code.

Perform some interactive debugging with tracer bullet output ( echo/print() )and breakpoints ( die() ) with all cache <b>disabled</b> to learn for yourself just how to successfully develop using this functionality.

//kracker
<i>Deftones : Knife Prty (Acoustic)</i>

Member since: 2001.07.13 || http://ezpedia.se7enx.com/

Marko Žmak

Wednesday 25 May 2005 3:23:15 am

I'll probably try it in a week or two (don't have time right now). If I have success I'll reported here.

--
Nothing is impossible. Not if you can imagine it!

Hubert Farnsworth

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 21:18:23
Script start
Timing: Jan 18 2025 21:18:23
Module start 'layout'
Timing: Jan 18 2025 21:18:23
Module start 'content'
Timing: Jan 18 2025 21:18:25
Module end 'content'
Timing: Jan 18 2025 21:18:25
Script end

Main resources:

Total runtime1.2115 sec
Peak memory usage4,096.0000 KB
Database Queries71

Timing points:

CheckpointStart (sec)Duration (sec)Memory at start (KB)Memory used (KB)
Script start 0.00000.0071 588.0313152.6406
Module start 'layout' 0.00710.0039 740.671939.4609
Module start 'content' 0.01101.1988 780.1328645.5625
Module end 'content' 1.20980.0016 1,425.695320.1563
Script end 1.2114  1,445.8516 

Time accumulators:

 Accumulator Duration (sec) Duration (%) Count Average (sec)
Ini load
Load cache0.00440.3627160.0003
Check MTime0.00150.1226160.0001
Mysql Total
Database connection0.00070.059710.0007
Mysqli_queries1.132593.4814710.0160
Looping result0.00080.0638690.0000
Template Total1.179197.320.5895
Template load0.00200.163220.0010
Template processing1.177197.160520.5885
Template load and register function0.00010.008810.0001
states
state_id_array0.00080.068010.0008
state_identifier_array0.00130.104520.0006
Override
Cache load0.00170.1410520.0000
Sytem overhead
Fetch class attribute can translate value0.00100.083630.0003
Fetch class attribute name0.00140.1118100.0001
XML
Image XML parsing0.00190.160130.0006
class_abstraction
Instantiating content class attribute0.00000.0031140.0000
General
dbfile0.00120.1018320.0000
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
7content/datatype/view/ezimage.tpl<No override>extension/sevenx/design/simple/templates/content/datatype/view/ezimage.tplEdit templateOverride template
7content/datatype/view/ezxmltext.tpl<No override>extension/community_design/design/suncana/templates/content/datatype/view/ezxmltext.tplEdit templateOverride template
13content/datatype/view/ezxmltags/paragraph.tpl<No override>extension/ezwebin/design/ezwebin/templates/content/datatype/view/ezxmltags/paragraph.tplEdit templateOverride template
7content/datatype/view/ezxmltags/line.tpl<No override>design/standard/templates/content/datatype/view/ezxmltags/line.tplEdit templateOverride template
1print_pagelayout.tpl<No override>extension/community/design/community/templates/print_pagelayout.tplEdit templateOverride template
 Number of times templates used: 36
 Number of unique templates used: 6

Time used to render debug report: 0.0002 secs