eZ Community » Forums » Setup & design » Admin treemenu links are wrong with...
expandshrink

Admin treemenu links are wrong with changes RootNode

Admin treemenu links are wrong with changes RootNode

Thursday 25 September 2014 9:55:17 pm - 3 replies

I have been trying to setup a new admin site that locks a user into their own branch in a multi-site setup.

Here are the parts I believe are most pertinent:

content.ini.append.php

[NodeSettings]
RootNode=96
MediaRootNode=105

contentstructuremenu.ini.append.php

[TreeMenu]
RootNodeID=96

In ezpublish.yml I have:

        site1_admin:
            legacy_mode: true
            languages:
                - eng-CA
                - fre-CA
            content:
                tree_root:
                    location_id: 96

Note I am not excluding the media path as show in the documentation as i do not want it excluded.

These settings seem to work as the media tab on the top of the admin takes you to the correct media folder when selected. The tree menu shows the correct tree.

This issue is that when you select a folder such as files from the tree menu or the children list it takes you to an "The requested page could not be displayed. (20)"

For example the link it give for "Files" is http://example.com/site1_admin/site1/Media/Files.  This at first looks correct as it is the full path, but does not work,

I then tried manually http://example.com/site1_admin/Media/Files thinking since the rootnode is changed the link may have to be relative to the rootnode.  This link also results in another "The requested page could not be displayed. (20)"

Links under the main content tree work correctly in both the tree menu and children list. For example http://example.com/site1_admin/Article1 works as expected.

Any ideas why these to not for the media folders?

Friday 26 September 2014 2:55:16 am

Hello Douglas,

I made all the legacy changes you show in your last message and I did not have the problems you are having at all.

I did not make the changes to ezpublish.yml as I am only running a pure legacy installation (no symfony).

After looking at the documentation your reference so slightly (include a link next time, ps google is strong with this one) I think that you need to exclude the /media tree (at the very least). Have you tried adding this setting clearing all caches in both stacks and testing again?

RE: https://doc.ez.no/display/EZP/Multisite+using+content_root

ezpublish:
    system:
        ezdemo_site_group:
            content:
               tree_root:
                    # Root locationId. Default is top locationId
                    location_id: 123
                    # Every URL aliases starting with those prefixes will be considered
                    # being outside of the subtree starting at root_location.
                    # Default value is an empty array.
                    # Prefixes are not case sensitive.
                    excluded_uri_prefixes: [ /media, /images ]

The way I read these comments in the yaml is saying if your subtree is outside your content tree root (which media is) then you must exclude it or it won't be able to find the content looking in your root folder which is not really the root folder.

Test again, tell us what happens... Like I said I did not encounter the errors you describe. Content loaded normally via the tree menu links and children links.

I hope this helps!

Cheers,
Heath 

Modified on Friday 26 September 2014 2:58:15 am by // Heath

Friday 26 September 2014 4:33:56 am

Thanks for your reply again.

I did try it with excluded_uri_prefixes: [ /media, /images ] and cleared the cashes with no difference.

I read the documentation over again as I had it stuck in my head this was mainly for the /media folder in the root of a stock install.  It hit me that the media folder for this site was indeed outside the rootnode specified by tree_root but was located at /site1/media after reading your reply.

This did the trick.

When I finish my write-up on how to setup a multi-site install I'll have to give you most of the credit.

Thanks again.

Saturday 27 September 2014 12:55:31 am

Hello Douglas,

Congratulations! I'm pleased you were able to figure out the issue causing your problems.

Thank you for your kind words. I don't do this for the credit. I do this to help make a positive impact in individuals lives one by one happy.gif Emoticon

When you do post your blog post on the topic please post links to the blog post in this thread and your other one: http://share.ez.no/forums/setup-design/howto-jail-admin-to-a-root-node

This way people following the history of these threads in the future will be able to find your blog post more quickly.

Take care

Cheers,
Heath 

expandshrink

You must be logged in to post messages in this topic!

36 542 Users on board!

Forums menu

Proudly Developed with from