How to replace root "Content" with a 'frontpage' objet ?

Author Message

H-Works Agency

Wednesday 30 July 2008 3:59:37 am

Hello,

I have a ezp install with a root folder.

How can i replace this root node with frontpage object i just created - for now as a child of this root "Content" folder.

This i really a problem in ezp not being able to manipulate objects having parent-node-id = 1.

Would be a great help to be able to create an object with depth = 0

EZP is Great

Bin LIU

Wednesday 30 July 2008 4:31:46 am

I think you must change it in database

firstly, import the class "frontpage".
if you have it by default, the class ID is 23

Then, use phpmyadmin, in table ezcontentobject_tree find the contentobject_id of the node_id 2. by default is 57

do (before this, please backup the database.)


update ezcontentobject set contentclass_id = 23 where id =57;

 


delete from ezcontentobject_attribute where contentobject_id = 57;

In the BO, delete the vache view node 2, and edit it, add a new version

normally, it's in frontpage.

Good luck

=== Lagardère Active ===

Fetch random
http://projects.ez.no/la_fetch_random
LA Static Cache
http://projects.ez.no/lastaticcache
LA Bookmarks (jquery)
http://projects.ez.no/labookmark
LA Calendar (jquery)
http://projects.ez.no/lacalendar

My site ez
http://lingping.info

Gaetano Giunta

Wednesday 30 July 2008 9:39:25 am

Or just use context menu - swap object!

Principal Consultant International Business
Member of the Community Project Board

J-A Eberhard

Saturday 16 August 2008 1:54:27 am

Hi,

In eZ publish serie 4.x, you have to type

UPDATE `ezcontentobject` SET `contentclass_id` = '23' WHERE `ezcontentobject`.`id` =1 LIMIT 1 ;

where folder is class 1 and frontpage class 23

Open Source Solution Provider
Open-Net Ltd Switzerland
http://www.open-net.ch

J-A Eberhard

Saturday 16 August 2008 1:56:08 am

In eZ 4.x you have to use
UPDATE `ezcontentobject` SET `contentclass_id` = '23' WHERE `ezcontentobject`.`id` =1 LIMIT 1 ;

Open Source Solution Provider
Open-Net Ltd Switzerland
http://www.open-net.ch

Marius Edvardsen

Tuesday 26 August 2008 5:47:03 am

Did a "UPDATE..." in mySQL. The content root now is listed as a "Frontpage" and not a "Folder". My problem is that it still only shows Folder-attributes, and not any Frontpage attributes as "Banner" etc. I allso have emptyed all caches. What am I doing wrong here?

Bin LIU

Wednesday 27 August 2008 1:05:36 am

Hi Marius,

I think you hadn't delete the contentobject_attribute. if you delete it, il will recreate the new attributes as a frontpage

=== Lagardère Active ===

Fetch random
http://projects.ez.no/la_fetch_random
LA Static Cache
http://projects.ez.no/lastaticcache
LA Bookmarks (jquery)
http://projects.ez.no/labookmark
LA Calendar (jquery)
http://projects.ez.no/lacalendar

My site ez
http://lingping.info

Marius Edvardsen

Saturday 30 August 2008 2:05:50 am

Thanks, would believe that it would do the trick. However did I just use Gaetano Giunta's swap object tip to work around the problem. (Didn't know that you had to left click the icon to acess the context menu - new world opened ).

Anyways, problem solved! Thanks!

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

Main resources:

Total runtime0.2078 sec
Peak memory usage4,096.0000 KB
Database Queries80

Timing points:

CheckpointStart (sec)Duration (sec)Memory at start (KB)Memory used (KB)
Script start 0.00000.0059 588.1875152.6563
Module start 'layout' 0.00590.0043 740.843839.5078
Module start 'content' 0.01020.1962 780.3516720.7109
Module end 'content' 0.20640.0014 1,501.062520.0859
Script end 0.2077  1,521.1484 

Time accumulators:

 Accumulator Duration (sec) Duration (%) Count Average (sec)
Ini load
Load cache0.00361.7411160.0002
Check MTime0.00160.7901160.0001
Mysql Total
Database connection0.00080.364910.0008
Mysqli_queries0.132863.8934800.0017
Looping result0.00080.3879780.0000
Template Total0.175384.420.0876
Template load0.00190.930320.0010
Template processing0.173383.421120.0867
Template load and register function0.00010.052910.0001
states
state_id_array0.00080.387510.0008
state_identifier_array0.00070.319120.0003
Override
Cache load0.00170.8422450.0000
Sytem overhead
Fetch class attribute can translate value0.00070.326050.0001
Fetch class attribute name0.00180.8776120.0002
XML
Image XML parsing0.00221.068850.0004
class_abstraction
Instantiating content class attribute0.00000.0127140.0000
General
dbfile0.00110.5276330.0000
String conversion0.00000.003740.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/ezimage.tpl<No override>extension/sevenx/design/simple/templates/content/datatype/view/ezimage.tplEdit templateOverride template
8content/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
3content/datatype/view/ezxmltags/line.tpl<No override>design/standard/templates/content/datatype/view/ezxmltags/line.tplEdit templateOverride template
3content/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: 35
 Number of unique templates used: 7

Time used to render debug report: 0.0001 secs