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

Greebo: new page / namespaces broken #2355

Closed
stueja opened this Issue Apr 27, 2018 · 8 comments

Comments

Projects
None yet
4 participants
@stueja

stueja commented Apr 27, 2018

When entering a new namespace/pagename in the search field (e. g. it:server:setup), the latest release converts that to server_setup with an underscore. (See also article of a different user in German forums on dokuwiki webpage).

@splitbrain splitbrain added the Bug label Apr 27, 2018

@splitbrain splitbrain added this to the 🐱 Greebo milestone Apr 27, 2018

@splitbrain

This comment has been minimized.

Owner

splitbrain commented Apr 27, 2018

@micgro42 I guess createPagenameFromQuery is a bit too clever or maybe not clever enough. My first instinct was to simply see if the query contains no spaces, if so just pass the query as is to cleanID. But we need to take the namespace into account (which may have be added automatically)... Any ideas how to solve this?

@stueja as a workaround you can use setup @it:server for now.

@micgro42

This comment has been minimized.

Collaborator

micgro42 commented Apr 27, 2018

Passing the query to cleanID is basically what we did before Greebo and it messes things up if one uses anything different than the most basic query. E.g. if you searched for foo -bar you got the page foo_bar suggested which is very likely not what you want, since you explicitly excluded bar.

However, I can add a check to see whether cleanID() leaves the query unchanged, i.e. the query is already a valid pageid, and than return that query as the suggested page name. The parsed query would than only be used for cases where the query is not a valid pageid.

That being said, using the search as a primary means to create new pages is not the way it's supposed to be. Create links on other pages for that purpose. ☝️

@micgro42

This comment has been minimized.

Collaborator

micgro42 commented Apr 27, 2018

Also using "it:server:setup" (with double quotes) works just fine...

@michitux

This comment has been minimized.

Collaborator

michitux commented Apr 27, 2018

@micgro42 the documentation explicitly mentions the search as a possibility to create pages (btw. that needs to be updated for the new release). I think for users that don't want to/don't know how to edit the URL and don't want to create a link (e.g. because they use a full sitemap as sidebar where the page will be linked automatically) this is the easiest/only way to create a page.

micgro42 pushed a commit that referenced this issue Apr 27, 2018

Michael Große
feat: improve search as a primary means to create new pages
Specifically, this pull request checks if the current query is already a
valid pageid and then return that as suggested pageid.

Also, tests are added for this method.

Fixes #2355

PS: We may want to somehow better educate/nudge users to use the better
way of creating pages by creating links on existing pages.
@micgro42

This comment has been minimized.

Collaborator

micgro42 commented Apr 27, 2018

@michitux Thanks, your reference to the documentation does give that request a bit more reasonability. However, I consider this a negative side-effect of aggregating functionalities, that the basic links between pages are eroded. Nevertheless, the documentation should accurately reflect the intended state of the application. Which part do you consider out of date? (execpt the screencast by @splitbrain, which I cannot even play anymore.)

@michitux

This comment has been minimized.

Collaborator

michitux commented Apr 27, 2018

@micgro42 The documentation says that you can just press the "create this page" button of the template. However, with the new UI, the page id is no longer changed (so you stay on the old page) but there is an explicit link that you need to click in the text above the search result.

@micgro42

This comment has been minimized.

Collaborator

micgro42 commented Apr 27, 2018

Ah yes! Fixing it...

Edit: Done.

@stueja

This comment has been minimized.

stueja commented Apr 28, 2018

Thank you very much for the lightning fast presentation of workarounds ("it:server:setup" in double quotes) and solution!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment