Forums / Setup & design / Changing the media node in 3.2

Changing the media node in 3.2

Author Message

James Ward

Thursday 18 September 2003 2:32:01 pm

I have 3.2 up and running with my custom 3.1 site design. I used the dbupdate supplied and added the appropriate site access' for the user and admin sites.

My problem is with the wonderful new media section. It appears that the media section was hardcoded to use node 43. I had a folder that was node 43 on my website and it has subsequently been deleted. Now when I click the media tab I get the following error:
-------------------------------------------
Error / kernel (3)

Object is unavailable
The object you requested is not currently available.

Possible reasons for this is.

The id or name of the object was misspelled, try changing it.
The object is no longer available on the site.
---------------------------------------------

Could someone post the sql statement required to add the media folder correctly so that it gets node 43 and does not appear in the content page? I'm trying to work of a clean 3.2 install but I am affraid of wrecking my active site.

working at www.wardnet.com
blogging at www.jamesward.ca

Tony Wood

Friday 19 September 2003 2:21:59 am

Hi,

overrive content.ini.php and add

[NodeSettings]
# The node ID for the media tree
MediaRootNode= x

Where x is the root node for media files.

tony

Tony Wood : twitter.com/tonywood
Vision with Technology
Experts in eZ Publish consulting & development

Power to the Editor!

Free eZ Training : http://www.VisionWT.com/training
eZ Future Podcast : http://www.VisionWT.com/eZ-Future

Chris Winchester

Friday 19 September 2003 4:19:03 am

Thanks Tony - I had the same problem. I did need to clear the cache though before the change became visible - just in case anyone tries it and it doesn't seem to work!
- Chris

James Ward

Sunday 21 September 2003 12:33:42 am

Thanks a bunch Tony. Works like a charm.

working at www.wardnet.com
blogging at www.jamesward.ca

Jonny Bergkvist

Monday 22 September 2003 1:48:50 am

OK, but how do you create the special media-folder (top node for media)?

I am upgrading from 3.1 stable to 3.2 stable and had the same problem as this thread describes.

I tried to make a new folder in the Content-tab, and I put the ID of this folder into MediaRootNode=

After that I don't get any errors when clicking on Media-tab, but I do not get a special Media-folder either. It just jumps to Content-tab and that folder I created there.

Any solution to this?

Jonny

alt alt

Monday 22 September 2003 6:30:10 am

I try to create folder and change attributes ( to parent node be 1 ) but nothing happens. Media tab shows its content like usual folder.

What i need to do for correct media view? Changing MediaRootFolder doesn't helps too.

Adri Rots

Saturday 27 September 2003 3:11:03 am

Same here. No media view.

James Ward

Thursday 23 October 2003 9:59:24 am

It appears the problem with the media folder appearing as a normal folder is in the sitedesign admin override.ini.append. The code:
[media_folder]
Source=node/view/full.tpl
MatchFile=media_folder.tpl
Subdir=templates
Match[class]=1
Match[navigation_part_identifier]=ezmedianavigationpart

Is supposed to override the media folder with the pretty thumbnail view. I just hard coded the last line of mine to get the view working. So now it looks like:

[media_folder]
Source=node/view/full.tpl
MatchFile=media_folder.tpl
Subdir=templates
Match[class]=1
Match[node]=119

Unfortunatly this does not take my media folder out of my root folder view. Also if you click on the media folder in the root folder view you get the pretty thumbnails. The problem appears to be in the fact that kernel/classes/eznavigationpart.php does not recognize my folder named Media as the Media folder.

I wonder if I need to change something about my media folder itself to get array( 'name' => 'Media', 'identifier' => 'ezmedianavigationpart' ) to do what it is supposed to.

In the mean time the hardcoded media folder seems to work ok.

working at www.wardnet.com
blogging at www.jamesward.ca

Jonny Bergkvist

Thursday 23 October 2003 12:31:27 pm

This is what you need to do to make the media view work:

1: Make a new section: Media, with navigationpart Media.

2: Make the media-folder under the absolute root/top-node:
http://hostname/content/view/full/1

3: Assign section Media to the node you created.

4: Put the node_id of the Media-node into settings/override/content.ini.append:
MediaRootFolder=<node_id>

This worked for me :-)

There is also a bug with the view of the subfolders in Media view, they are not clickable. Heres a fix for this:
http://ez.no/developer/ez_publish_3/bug_reports/link_in_media_template_of_folder_is_broken

James Ward

Thursday 23 October 2003 1:13:46 pm

I was just returning to the thread to post the same thing Johny. I think this issue can be put to bed.
I figured the section thing out shortly after I posted but I like your solution for getting the media folder into the top node. It never occured to me to just change the 2 to a 1 in my url. I was going to manually edit the ezcontentobject_tree table to get the folder where it belonged.

Thanks for saving me from myself :)

working at www.wardnet.com
blogging at www.jamesward.ca