Forums / Extensions / eZ Flow / How to replace root "Content" with a 'frontpage' objet ?

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!

eZ debug

Timing: Jan 30 2025 00:49:04
Script start
Timing: Jan 30 2025 00:49:04
Module start 'content'
Timing: Jan 30 2025 00:49:04
Module end 'content'
Timing: Jan 30 2025 00:49:05
Script end

Main resources:

Total runtime0.1913 sec
Peak memory usage2,048.0000 KB
Database Queries141

Timing points:

CheckpointStart (sec)Duration (sec)Memory at start (KB)Memory used (KB)
Script start 0.00000.0060 588.2031180.7578
Module start 'content' 0.00600.0046 768.9609103.1797
Module end 'content' 0.01060.1807 872.1406536.0000
Script end 0.1912  1,408.1406 

Time accumulators:

 Accumulator Duration (sec) Duration (%) Count Average (sec)
Ini load
Load cache0.00281.4656200.0001
Check MTime0.00110.5939200.0001
Mysql Total
Database connection0.00060.334010.0006
Mysqli_queries0.151579.21381410.0011
Looping result0.00130.66561390.0000
Template Total0.180494.310.1804
Template load0.00060.335510.0006
Template processing0.179793.953810.1797
Override
Cache load0.00040.225310.0004
Sytem overhead
Fetch class attribute can translate value0.00070.384310.0007
XML
Image XML parsing0.00020.130210.0002
General
dbfile0.00281.4589200.0001
String conversion0.00000.003230.0000
Note: percentages do not add up to 100% because some accumulators overlap

CSS/JS files loaded with "ezjscPacker" during request:

CacheTypePacklevelSourceFiles
CSS0extension/community/design/community/stylesheets/ext/jquery.autocomplete.css
extension/community_design/design/suncana/stylesheets/scrollbars.css
extension/community_design/design/suncana/stylesheets/tabs.css
extension/community_design/design/suncana/stylesheets/roadmap.css
extension/community_design/design/suncana/stylesheets/content.css
extension/community_design/design/suncana/stylesheets/star-rating.css
extension/community_design/design/suncana/stylesheets/syntax_and_custom_tags.css
extension/community_design/design/suncana/stylesheets/buttons.css
extension/community_design/design/suncana/stylesheets/tweetbox.css
extension/community_design/design/suncana/stylesheets/jquery.fancybox-1.3.4.css
extension/bcsmoothgallery/design/standard/stylesheets/magnific-popup.css
extension/sevenx/design/simple/stylesheets/star_rating.css
extension/sevenx/design/simple/stylesheets/libs/fontawesome/css/all.min.css
extension/sevenx/design/simple/stylesheets/main.v02.css
extension/sevenx/design/simple/stylesheets/main.v02.res.css
JS0extension/ezjscore/design/standard/lib/yui/3.17.2/build/yui/yui-min.js
extension/ezjscore/design/standard/javascript/jquery-3.7.0.min.js
extension/community_design/design/suncana/javascript/jquery.ui.core.min.js
extension/community_design/design/suncana/javascript/jquery.ui.widget.min.js
extension/community_design/design/suncana/javascript/jquery.easing.1.3.js
extension/community_design/design/suncana/javascript/jquery.ui.tabs.js
extension/community_design/design/suncana/javascript/jquery.hoverIntent.min.js
extension/community_design/design/suncana/javascript/jquery.popmenu.js
extension/community_design/design/suncana/javascript/jScrollPane.js
extension/community_design/design/suncana/javascript/jquery.mousewheel.js
extension/community_design/design/suncana/javascript/jquery.cycle.all.js
extension/sevenx/design/simple/javascript/jquery.scrollTo.js
extension/community_design/design/suncana/javascript/jquery.cookie.js
extension/community_design/design/suncana/javascript/ezstarrating_jquery.js
extension/community_design/design/suncana/javascript/jquery.initboxes.js
extension/community_design/design/suncana/javascript/app.js
extension/community_design/design/suncana/javascript/twitterwidget.js
extension/community_design/design/suncana/javascript/community.js
extension/community_design/design/suncana/javascript/roadmap.js
extension/community_design/design/suncana/javascript/ez.js
extension/community_design/design/suncana/javascript/ezshareevents.js
extension/sevenx/design/simple/javascript/main.js

Templates used to render the page:

UsageRequested templateTemplateTemplate loadedEditOverride
1pagelayout.tpl<No override>extension/sevenx/design/simple/templates/pagelayout.tplEdit templateOverride template
 Number of times templates used: 1
 Number of unique templates used: 1

Time used to render debug report: 0.0001 secs