Modify a node without creator modification

Author Message

Fabien Audin

Tuesday 06 April 2010 1:24:31 am

Hello,

I have one problem with ezpublish. I want to give different rights to users. They can edit their own articles. But the administrator can edit them because of its status. If the administrator edit a user's article, the creator id is modified and the creator at the beginning cannot modify it again.

Do you understand my question and do you have any idea for that?

Thanks in advance

Nicolas Pastorino

Tuesday 06 April 2010 3:12:28 am

Hello Fabien, and welcome in the eZ Community !

About your question : are you talking about a workflow process (approval for instance) ?

Let us know so that we can further help you,
Cheers,

--
Nicolas Pastorino
Director Community - eZ
Member of the Community Project Board

eZ Publish Community on twitter: http://twitter.com/ezcommunity

t : http://twitter.com/jeanvoye
G+ : http://plus.tl/jeanvoye

Fabien Audin

Tuesday 06 April 2010 4:53:16 am

Thanks for your reply.

I'm talking about the workflow which is launched when you modify an article (for example) in the public website not from the administration panel.

I read something about a creator_id and an owner_id. Is there a difference between both? Are they same?

I just want to conserv the first creator's id.

Fabien Audin

Tuesday 06 April 2010 7:22:49 am

I have found the problem.

If you have an "test", test.contentobject_version_object.creator.id (the contentobject_id) is modified when somebody modifies an article. But the test.object.owner.id (the contentobject_id) do not change. It's the id of the first article's creator => the OWNER.

It's quite misleading. But in my case I need the test.object.owner.id to make my website work.

Question : do you know how can I get the owner's node_id, because test.object.owner.id return the contentobject_id

Thanks a lot

Nicolas Pastorino

Tuesday 06 April 2010 7:44:52 am

"

Question : do you know how can I get the owner's node_id, because test.object.owner.id return the contentobject_id

"

Hi Fabien,

You need to do something like this :

{def $ownerNodeId=$test.object.owner.main_node_id}

Hope it helps,
Cheers,

--
Nicolas Pastorino
Director Community - eZ
Member of the Community Project Board

eZ Publish Community on twitter: http://twitter.com/ezcommunity

t : http://twitter.com/jeanvoye
G+ : http://plus.tl/jeanvoye

Fabien Audin

Tuesday 06 April 2010 8:09:59 am

Hi Nicolas,

Ok thank you very much for your replies.

Bye

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 05:08:08
Script start
Timing: Jan 18 2025 05:08:08
Module start 'layout'
Timing: Jan 18 2025 05:08:08
Module start 'content'
Timing: Jan 18 2025 05:08:09
Module end 'content'
Timing: Jan 18 2025 05:08:09
Script end

Main resources:

Total runtime1.2812 sec
Peak memory usage4,096.0000 KB
Database Queries66

Timing points:

CheckpointStart (sec)Duration (sec)Memory at start (KB)Memory used (KB)
Script start 0.00000.0073 588.0469152.6406
Module start 'layout' 0.00730.0040 740.687539.4766
Module start 'content' 0.01131.2686 780.1641573.6172
Module end 'content' 1.27990.0013 1,353.781316.1250
Script end 1.2812  1,369.9063 

Time accumulators:

 Accumulator Duration (sec) Duration (%) Count Average (sec)
Ini load
Load cache0.00310.2423160.0002
Check MTime0.00130.1037160.0001
Mysql Total
Database connection0.00160.121210.0016
Mysqli_queries1.223195.4669660.0185
Looping result0.00060.0467640.0000
Template Total1.247297.320.6236
Template load0.00190.150620.0010
Template processing1.245397.194920.6226
Template load and register function0.00020.017410.0002
states
state_id_array0.00170.130010.0017
state_identifier_array0.00190.145920.0009
Override
Cache load0.00170.1319420.0000
Sytem overhead
Fetch class attribute can translate value0.00070.052220.0003
Fetch class attribute name0.00120.095770.0002
XML
Image XML parsing0.00100.078520.0005
class_abstraction
Instantiating content class attribute0.00000.001680.0000
General
dbfile0.00090.0679160.0001
String conversion0.00000.000940.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
6content/datatype/view/ezxmltext.tpl<No override>extension/community_design/design/suncana/templates/content/datatype/view/ezxmltext.tplEdit templateOverride template
12content/datatype/view/ezxmltags/paragraph.tpl<No override>extension/ezwebin/design/ezwebin/templates/content/datatype/view/ezxmltags/paragraph.tplEdit templateOverride template
2content/datatype/view/ezimage.tpl<No override>extension/sevenx/design/simple/templates/content/datatype/view/ezimage.tplEdit templateOverride template
2content/datatype/view/ezxmltags/line.tpl<No override>design/standard/templates/content/datatype/view/ezxmltags/line.tplEdit templateOverride template
4content/datatype/view/ezxmltags/strong.tpl<No override>design/standard/templates/content/datatype/view/ezxmltags/strong.tplEdit templateOverride template
1content/datatype/view/ezxmltags/quote.tpldatatype/ezxmltext/quote.tplextension/ezwebin/design/ezwebin/override/templates/datatype/ezxmltext/quote.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: 30
 Number of unique templates used: 9

Time used to render debug report: 0.0001 secs