You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@jspwiki.apache.org by "arturobernalg (via GitHub)" <gi...@apache.org> on 2026/10/22 07:03:28 UTC

[PR] JSPWIKI-647 Resolve page aliases when the page cache is disabled [jspwiki]

arturobernalg opened a new pull request, #536:
URL: https://github.com/apache/jspwiki/pull/536

   https://issues.apache.org/jira/browse/JSPWIKI-647
   
   A page alias, set with `[{SET alias='PageName'}]`, did not redirect when the page cache was disabled (`jspwiki.cache.enable = false`; the reporter used the deprecated `jspwiki.usePageCache`).
   
   The `alias` and `redirect` page attributes are set by the markup parser. `CachingProvider` parses a page it has just fetched so that those attributes exist, but without the page cache that provider is not used, so `WikiContext#getRedirectURL()` found no alias. As the comments on the issue suggest, the difference is `CachingProvider#refreshMetadata`.
   
   `WikiContext#getRedirectURL()` now parses the page for its metadata when the page has none. Only the redirect lookup pays for the parse, and a cached page already has its metadata, so nothing changes with the cache enabled.
   
   `PageAliasTest` saves a page with an alias and checks that its redirect URL is the view URL of the target, with and without the page cache. The test without the cache failed before the change (the redirect URL was `null`) and passes with it. The `jspwiki-main` test suite passes (930 tests).
   
   Calling the parse from `PageManager#getPageInfo` would also fix it, but it would parse every page that is looked up without the cache, for example for the recent changes list, so I limited it to the redirect lookup.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: dev-unsubscribe@jspwiki.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] JSPWIKI-647 Resolve page aliases when the page cache is disabled [jspwiki]

Posted by "arturobernalg (via GitHub)" <gi...@apache.org>.
arturobernalg merged PR #536:
URL: https://github.com/apache/jspwiki/pull/536


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: dev-unsubscribe@jspwiki.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] JSPWIKI-647 Resolve page aliases when the page cache is disabled [jspwiki]

Posted by "spyhunter99 (via GitHub)" <gi...@apache.org>.
spyhunter99 commented on PR #536:
URL: https://github.com/apache/jspwiki/pull/536#issuecomment-6430730324

   looks good to me, awesome


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: dev-unsubscribe@jspwiki.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org