Dokuwiki: Greebo: new page / namespaces broken

Created on 27 Apr 2018  路  9Comments  路  Source: splitbrain/dokuwiki

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).

Bug

Most helpful comment

@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.

All 9 comments

@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.

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. 鈽濓笍

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

@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.

@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.)

@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.

Ah yes! Fixing it...

Edit: Done.

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

I think the search field still has some bugs.

Hereafter I try to create pages and namespaces using the search field following the examples reported at https://www.dokuwiki.org/namespaces#creating_namespaces.

Let's say the page foo:bar:start already exists and it's the current namespace.

  • expected page :foo:bar:pg
    type pg return :pg
    type .pg return :pg
    type .:pg return :pg

  • expected page :pg
    type :pg return :pg ok

  • expected page :foo:pg
    type ..pg return :pg
    type ..:pg return :pg
    type .:..:pg return :pg

  • expected page :wiki:pg
    type wiki:pg return :wiki:pg ok

  • expected page :ns1:ns2:pg
    type ns1:ns2:pg return :ns1:ns2:pg ok
    type :ns1:ns2:pg return :ns1_ns2_pg

  • expected page :foo:bar:ns1:ns2:pg
    type .ns1:ns2:pg return :ns1_ns2_pg
    type .:ns1:ns2:pg return :ns1_ns2_pg

  • expected page :foo:ns1:ns2:pg
    type ..ns1:ns2:pg return :ns1_ns2_pg
    type ..:ns1:ns2:pg return :ns1_ns2_pg

  • expected page :foo:bar:ns1:ns2:start
    type .ns1:ns2: return :ns1_ns2
    type .:ns1:ns2: return :ns1_ns2

tested with Release 2018-04-22b "Greebo"

Was this page helpful?
0 / 5 - 0 ratings

Related issues

appliedprivacy picture appliedprivacy  路  4Comments

systemofapwne picture systemofapwne  路  6Comments

yasuhirokimura picture yasuhirokimura  路  5Comments

ackbyte picture ackbyte  路  3Comments

splitbrain picture splitbrain  路  4Comments