SoarinFerret / dokuwiki-plugin-pagebuttons

https://www.dokuwiki.org/plugin:pagebuttons
GNU General Public License v2.0
0 stars 8 forks source link

"New page" and "new folder" buttons are not showing #1

Closed GJRobert closed 3 years ago

GJRobert commented 4 years ago

These two buttons are not showing on Hogfather 51.3 (Stable) DokuWiki. Only "delete page" button is showing. Almost the same as the menu button of deletepagebutton plugin.

SoarinFerret commented 3 years ago

I am on the Hogfather release as well and the 'New Page' and 'New Folder' buttons work for me.

These buttons create new subpages / folders, so you have to be in a folder already for them to work. If your URL is /doku.php?id=start, you technically are not in a folder so it doesn't make since to add a new page or folder.

However, if your URL is something like /doku.php?id=wiki:start, then both buttons should appear. I hope that makes sense?

SoarinFerret commented 3 years ago

I do see how it would be useful though to have the buttons appear all the time though. I will work on a patch this weekend to enable that functionality. In my head when I built it I didn't think about the buttons being there all the time

GJRobert commented 3 years ago

Hi, perhaps I should have clarified that, on my Hogfather, none of the pagebuttons appear. So it does not seem to be only with "new page" and "new folder" buttons. My bad.

The only delete button I see, seems to be from plugin:deletepagebutton, because the link on that specific button is http://localhost/dw-hog-test/doku.php?id=wiki:dokuwiki&do=deletepagebutton&sectok=bf95c81991217d3eca754beb6a6d57aa

After disabling plugin:deletepagebutton, I still see that button, and none of pagebuttons buttons of yours appear.

I have installed both your plugin and that plugin together, and I'm not sure this is the cause of the problem. I will install another new instance of DW to investigate this.

MartijnRas commented 3 years ago

I just installed this plugin for the first time in Hogfather, i can confirm that none of the buttons appear.

SoarinFerret commented 3 years ago

Ok, so I'm definitely not seeing what you two are seeing for whatever reason. Here is how I am testing:

  1. Create a Dokuwiki container running the Hogfather release. Here is the docker-compose.yml I am using:
    version: "3.3"
    services:
    dokuwiki:
    environment:
      - DOKUWIKI_PASSWORD=password
    image: bitnami/dokuwiki:20200729
    ports:
      - "8080:8080"
  2. Login to the web interface with superuser and password image
  3. Go to Admin ->Extension Manger -> Search and Install, and download the latest version of Page Buttons image
  4. On the root page (aka http://127.0.0.1:8080/start), you will not see any buttons, because a page does not exist. image
  5. Create the page, and now the "Delete Page" button appears image
  6. Now, create a folder by going to http://127.0.0.1:8080/start:start?do=edit, put something in there and save.
  7. Now on the right hand side, all 3 buttons appear: New Page, New Folder, and Delete image

Now, with that being said, that is how I have specifically been using this. As I mentioned above, it probably makes sense for the New Page / New Folder buttons to pretty much always be around, and they just go within the existing namespace. Instead of me just only allowing it on the "start" page of every folder.

I am working on a patch right now to enable this functionality, and I plan for it to become the new default. I'll update this issue once I create that. Please let me know how you are testing if you are not seeing the same thing! Thanks!

SoarinFerret commented 3 years ago

I have updated plugin so the new default functionality is to always show the newpage and newfolder buttons, as long as the page you are on already exists. This will simply add a new page / folder in your existing namespace.

Let me know if that helps! Thanks

MartijnRas commented 3 years ago

I was using the Adora Dark theme, the buttons indeed showed up when I switched back to the default theme.

GJRobert commented 3 years ago

I have updated plugin so the new default functionality is to always show the newpage and newfolder buttons, as long as the page you are on already exists. This will simply add a new page / folder in your existing namespace.

Let me know if that helps! Thanks

@SoarinFerret I have updated to your newest version, and now the New Page and New Folder buttons are always around. Before updating, the two buttons are not shown for me even with dokuwiki default template and in the scenario within a folder.

Great to see the issue solved, thanks a lot! I like this handy plugin.