luyadev / luya-module-cms

The LUYA CMS module provides a full functional CMS for adding contents based on blocks.
https://luya.io
MIT License
33 stars 46 forks source link

Invalid URL generation with offline pages in path #7

Open luya-bot opened 6 years ago

luya-bot commented 6 years ago

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.

nadar commented 5 years ago

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

rolandschaub commented 5 years ago

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.

nadar commented 5 years ago

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.

rolandschaub commented 5 years ago

Sounds good.