Object name - resetting

Author Message

Marin Orlic

Thursday 08 September 2005 8:50:56 am

Hi all,

is there a way to reset object names? To be more specific - I had a class C with attributes <name> <surname> and object name was set to be '<name> <surname>' ... now I need the name to be '<surname> <name>'. I've changed this in the class definition, but this applies only to new objects.

How can I reapply the name change to objects published before the change in class definition? There is a script called updatecontentobjectname.php but to me it looks like it's updating the search engine.

I hope somebody more proficient with eZ already had this problem and wrote some script ;)

Thanks!

Gabriel Ambuehl

Thursday 08 September 2005 9:12:35 am

I can say for sure that editing and saving the objects will fix it.

As for what the script does, I'll have to check. (But from memory, another script is responsible to regenerate the search index, one more aptly named)

Correction: looking at the code, it seems like a variant of the indexing script.

Visit http://triligon.org

Marin Orlic

Thursday 08 September 2005 9:30:51 am

Yep, I agree about editing and saving, but it's a loooot of objects :)

I would try to write some ezcli script myself, but I'd rather not mess anything up, just in case ;)

Kristof Coomans

Thursday 08 September 2005 11:18:36 pm

The script updatecontentobjectname.php only updates the name of contentobjects. If you use the --help option of the script, you'll get a description:

<i>eZ publish search index updater.
Goes trough all objects and reindexes the meta data to the search engine.
</i>

But this description is wrong! I'll report this as a bug.

To update the search index, the script updatesearchindex.php is used.

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

Kristof Coomans

Thursday 08 September 2005 11:37:39 pm

Reported as a bug: http://ez.no/bugs/view/7133

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

Marin Orlic

Friday 09 September 2005 10:35:13 am

So, can I use this script to update content object names?

Kristof Coomans

Saturday 10 September 2005 4:48:58 am

Yes you can.

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

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 19 2025 03:36:38
Script start
Timing: Jan 19 2025 03:36:38
Module start 'layout'
Timing: Jan 19 2025 03:36:38
Module start 'content'
Timing: Jan 19 2025 03:36:40
Module end 'content'
Timing: Jan 19 2025 03:36:40
Script end

Main resources:

Total runtime1.6714 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.0058 589.1484152.6250
Module start 'layout' 0.00580.0039 741.773439.4453
Module start 'content' 0.00971.6601 781.2188610.6172
Module end 'content' 1.66980.0016 1,391.835916.1719
Script end 1.6713  1,408.0078 

Time accumulators:

 Accumulator Duration (sec) Duration (%) Count Average (sec)
Ini load
Load cache0.00350.2073160.0002
Check MTime0.00140.0845160.0001
Mysql Total
Database connection0.00080.045510.0008
Mysqli_queries1.609896.3179710.0227
Looping result0.00140.0832690.0000
Template Total1.628197.420.8141
Template load0.00230.134920.0011
Template processing1.625997.276920.8129
Template load and register function0.00020.010410.0002
states
state_id_array0.00140.084210.0014
state_identifier_array0.00140.083620.0007
Override
Cache load0.00190.1135310.0001
Sytem overhead
Fetch class attribute can translate value0.00070.039330.0002
Fetch class attribute name0.00170.103680.0002
XML
Image XML parsing0.00080.046930.0003
class_abstraction
Instantiating content class attribute0.00000.0012100.0000
General
dbfile0.00080.0471160.0000
String conversion0.00000.000440.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/ezxmltext.tpl<No override>extension/community_design/design/suncana/templates/content/datatype/view/ezxmltext.tplEdit templateOverride template
8content/datatype/view/ezxmltags/paragraph.tpl<No override>extension/ezwebin/design/ezwebin/templates/content/datatype/view/ezxmltags/paragraph.tplEdit templateOverride template
3content/datatype/view/ezimage.tpl<No override>extension/sevenx/design/simple/templates/content/datatype/view/ezimage.tplEdit templateOverride template
1content/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: 21
 Number of unique templates used: 6

Time used to render debug report: 0.0001 secs