Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Malfunction of link browser involving VHM #204

Open
Rudd-O opened this issue Jul 15, 2020 · 1 comment
Open

Malfunction of link browser involving VHM #204

Rudd-O opened this issue Jul 15, 2020 · 1 comment

Comments

@Rudd-O
Copy link

Rudd-O commented Jul 15, 2020

I have a setup (with multilingual language folders, capable of acting as navigation roots, but this seems unrelated) which causes the link browser in the TinyMCE editor to fail. The proxy URL mapping is set up so that a root language folder is used as the navigation root (VHM is used for this).

When the editor loads, the @@getVocabulary XHR fails with an error "not allowed".

Here is what I have noticed, based on the JSON object embedded in the page, depending on how I set up the proxy URL mapping.

MY SETUP (ROOT IS LANGUAGE FOLDER) DOES NOT WORK

/VirtualHostBase/https/rudd-o.com/Rudd-O.com/en/VirtualHostRoot/abc/edit

The values commented with a pound sign below appear to be correct. However, the other values appear to have the wrong site root / base path.

#'base_url': 'https://rudd-o.com/abc',
#'contextPath': '/Rudd-O.com/en/abc', 
{'vocabularyUrl': 'https://rudd-o.com/abc/@@getVocabulary?name=plone.app.vocabularies.Catalog',
'rootUrl': 'https://rudd-o.com/abc', 
'basePath': '/Rudd-O.com/en/abc', 
'rootPath': '/Rudd-O.com/en/abc'

It bears noting that if I tell my proxy to munge https://rudd-o.com/abc/@@getVocabulary? into https://rudd-o.com/@@getVocabulary?, XHR begins working correctly (search for container via UID works), but then text box searches in the link editor gives no useful search results.

ALTERED SETUP (ROOT IS SITE) WORKS

/VirtualHostBase/https/rudd-o.com/Rudd-O.com/VirtualHostRoot/en/abc/edit

Seems okay and works with the link searchbox.

#'base_url':'https://rudd-o.com/en/abc',
#'contextPath': '/Rudd-O.com/en/abc',
'vocabularyUrl': 'https://rudd-o.com/@@getVocabulary?name=plone.app.vocabularies.Catalog',
'rootUrl': 'https://rudd-o.com',
'basePath': '/Rudd-O.com/en/abc',
'rootPath': '/Rudd-O.com'

PASSTHROUGH WITHOUT SUBFOLDER ROOT WORKS

VirtualHostBase/https/rudd-o.com/VirtualHostRoot/_vh_stagingpython2/_vh_zope/Rudd-O.com/en/abc/edit

Seems okay and works with the link searchbox.

#'base_url': 'https://rudd-o.com/stagingpython2/zope/Rudd-O.com/en/abc',
#'contextPath': '/Rudd-O.com/en/abc',
{'vocabularyUrl': 'https://rudd-o.com/stagingpython2/zope/Rudd-O.com/@@getVocabulary?name=plone.app.vocabularies.Catalog',
'rootUrl': 'https://rudd-o.com/stagingpython2/zope/Rudd-O.com',
'basePath': '/Rudd-O.com/en/abc',
'rootPath': '/Rudd-O.com',

Ultimately the impact is that the editor's link edit search box simply does not work under the specific (first) scenario above -- search does not work, the breadcrumb bar shows only the house icon, clicking on the icon does nothing. The scenario, to recap, is using a root language folder as the navigation root by way of VHM.

@Rudd-O
Copy link
Author

Rudd-O commented Jul 15, 2020

I traced the above JSON generation all the way to def get_relateditems_options() here: https://github.com/plone/plone.app.widgets/blob/master/plone/app/widgets/utils.py#L113 -- it looks like VHM use causes the navigation root to be wrong.

I am on version 3.0.3.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant