luya-module-cms icon indicating copy to clipboard operation
luya-module-cms copied to clipboard

Invalid URL generation with offline pages in path

Open luya-bot opened this issue 8 years ago • 4 comments

This issue has originally been reported by @rolandschaub at https://github.com/luyadev/luya/issues/1382. Moved here by @nadar.


What steps will reproduce the problem?

Make a web page with children offline. URLs to the child pages won't be formed correctly – LUYA will omit all path segments except the one for the target page. Example:

www.testsite.com/abc/def/ghj
will turn to the following when the page with the path segment "def" is offline:
www.testsite.com/ghj

What is the expected result?

The URL should include all path segments, including the ones of offline pages:
www.testsite.com/abc/def/ghj

Of course, the URL www.testsite.com/abc/def/ should still throw a 404 error, but www.testsite.com/abc/def/ghj should work and be generated correctly.

luya-bot avatar Dec 18 '17 19:12 luya-bot

This is only possible when we add offline pages to the menu component.

nadar avatar Feb 27 '19 08:02 nadar

If this is not possible then all children pages of offline pages should be treated as offline, too. The system should not generate invalid URLs.

rolandschaub avatar Feb 27 '19 08:02 rolandschaub

I think we could integrate the offline pages for building the menu path /foo/bar/xyz and remove them afterwards. I will try, this could work. Not sure how the path is resolved afterwards, but i will test.

nadar avatar Feb 27 '19 09:02 nadar

Sounds good.

rolandschaub avatar Feb 27 '19 09:02 rolandschaub