core icon indicating copy to clipboard operation
core copied to clipboard

Pages return 404 error on upgraded clients if CMS_INDEX_PAGE does not include page extension

Open joseorsini opened this issue 11 years ago • 6 comments

Reproduced in upgraded client from 2.5.6 to 3.2.

Steps(for upgraded clients)

  1. Upgrade a vanilla install of 2.5.6 to 3.2. It is not needed to apply a license after it's upgraded.
  2. Make sure that the home page is still /home/index.html
  3. Go to the page in Live mode. It returns a 404 error.

The workaround is to set the CMSINDEXPAGE to index.html so all index pages can be available in Live mode. This seems to be a problem with the current configuration since we already have a property for specifying the Page extension, which is VELOCITYPAGEEXTENSION.

Is there any way to check that if the VELOCITYPAGEEXTENSION property is set, the CMSFilter concatenates both properties and see if the URI resolves to an existing index page? This would ensure that CMSINDEXPAGE deal only with the page name without an extension, which it's something that remains on upgraded pages even after an upgrade from 2.x to 3.x.

joseorsini avatar May 12 '15 17:05 joseorsini

Please refer to this issue: https://github.com/dotCMS/core/issues/7598

brentgriffin avatar May 12 '15 18:05 brentgriffin

@brentgriffin I was talking to @maurizo about that issue in the last few days. The referred issue deals about HTMLPages parsed as file_assets (legacy files) because of the HTMLPage extension configuration which is still required when a partial from 1.9 to 2.x is being done. In this case, the issue is slightly different because the DB objects are not changed to others because of missing configuration, but all index.html pages in an upgraded site (from 2.5.x) cannot be displayed because the CMS_INDEX_PAGE does not consider that pages created in 2.5.x come with a specific extension.

joseorsini avatar May 12 '15 18:05 joseorsini

This is on purpose, I believe. If you have index.dot pages as your index page, then that should be what you enter for the CMS_INDEX_PAGE value On May 12, 2015 2:40 PM, "Jose Orsini" [email protected] wrote:

@brentgriffin https://github.com/brentgriffin I was talking to @maurizo https://github.com/maurizo about that issue in the last few days. The referred issue deals about HTMLPages parsed as file_assets (legacy files) because of the HTMLPage extension configuration which is still required when a partial from 1.9 to 2.x is being done. In this case, the issue is slightly different because the DB objects are not changed to others because of missing configuration, but all index.html pages in an upgraded site (from 2.5.x) cannot be displayed because the CMS_INDEX_PAGE does not consider that pages created in 2.5.x come with a specific extension.

— Reply to this email directly or view it on GitHub https://github.com/dotCMS/core/issues/7725#issuecomment-101381757.

dotcmsCodeReview avatar May 12 '15 20:05 dotcmsCodeReview

It was on purpose but can be improved using the CMS_INDEX_PAGE along with the VELOCITY_PAGE_EXTENSION (Example: CMS_INDEX_PAGE + "." + VELOCITY_PAGE_EXTENSION) instead of have to specify a extension for the index page when we already have a property for that, doing that would make the upgrade process simpler.

This can be easily altered after an upgrade, but just saying that can be done as an enhancement.

jgambarios avatar May 12 '15 21:05 jgambarios

As of 3.2 VELOCITY_PAGE_EXTENSION is not used in the system. I think the better fix for this is to allow the CMS_INDEX_PAGE variable to take a comma delimited list of index pages that should be tried by the CMSFilter before throwing a 404

wezell avatar May 14 '15 15:05 wezell

+1 for the comma delimited list

jkshapiro avatar May 14 '15 15:05 jkshapiro