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
Spaces are not replaced with underscore (config setting) - forbidden blank page instead #4238
Comments
Where does the user type in the name with spaces? The URL bar of the browser? If so then the browser most likely replaces the spaces with |
Oh, I wasn't very precise... This is before the page is created. There is a button to create a page and after clicking it, the native browser modal I pasted above appears to type in the name. Once I type that in, the url opens with spaces not replaced with underscores as on screenshot. Now that you asked, maybe this is not a core dokuwiki, but a page create plugin failure? Need to check which plugin this could be... In the previous version this worked well, i.e. when I typed in the name with spaces, the redirect to new page was already with underscores... Just tried similar though right click index menu and similar effect. |
Yes, probably a plugin. DokuWiki does not have any buttons to create pages or modal dialogs to enter (new) page names. Also, what template are you using? Might also be related?
Is this the sepchar setting? I have that set to |
Not a DokuWiki issue. See: SoarinFerret/dokuwiki-plugin-pagebuttons#20 |
I actually think there might be a regression here. Needs investigation. |
Okay, it seems DokuWiki itself is still working as expected. If an ID with spaces is passed as ID, it will be cleaned up correctly: https://www.dokuwiki.org/doku.php?id=playground:page%20with%20spaces However when the the ID is passed via mod_rewrite, a forbidden error is issued: https://www.dokuwiki.org/playground:page%20with%20spaces However I don't think it is triggered by DokuWiki but the web server? But I am not sure why... the rewrite should pass the ID on to doku.php, space or no space? If @macin is correct and this used to work in Jack Jackrum, I have no idea why. Or what the change is that causes the regression. Would be great if someone could confirm that it works on Jack. |
Ok, I (also?) tried this and to my surprise it worked: The cleanup of the page id happens when saving the page. While initially editing it, it still had the spaces/ I can't say what happens in the mod_rewrite case. Depends on the exact rewrite rules. If the rules from https://www.dokuwiki.org/install:apache are used then the URL would start out as: |
The problem
I have a config enabled to convert spaces to underscores.
However after upgrade to Kaos 6a I started getting feedback from the users, that they are not able to create pages.
AFter investigation, is seems that when user types in the namespace name with spaces, dokuwiki redirects to the page with %20 in the url
I was not able to confirm if this is server problem, or dokuwiki itself
Enter page name here
Version of DokuWiki
2024-0206a Kaos
PHP Version
8.2
Webserver and version of webserver
Ubuntu
Browser and version of browser, operating system running browser
Version 122.0.6261.71 (Official Build) (64-bit)
Additional environment information
No response
Relevant logs and/or error messages
No response
The text was updated successfully, but these errors were encountered: