zioth / dokuwiki_fastwiki

DokuWiki plugin which speeds up user interactions by avoiding page loads, rendering content client-side and pre-loading content.
GNU General Public License v2.0
9 stars 2 forks source link

Can't see any buttons #35

Closed mr-floppy closed 5 years ago

mr-floppy commented 5 years ago

Solution: If you do not see section edit buttons, make sure the docuwiki maxseclevel configuration is greater than 0! https://www.dokuwiki.org/section_editing


Hi!

I am almost positive, that this is not a bug but just me missing something.

I have installed fastwiki via the plugin manager and it is activated. When I look at the page source, I can see a fastwiki script entry in the header:

[...] "fastwiki":{"secedit":1,"preview":1,"fastpages":1,"save":0,"fastshow":0,"fastshow_same_ns":1,"fastshow_include":"","fastshow_exclude":"","preload":false,"preload_head":"====[SOMERANDOMSTRING]====","preload_batchsize":false,"preload_per_page":false,"locktime":840,"usedraft":1,"text_btn_show":"Seite anzeigen","templatename":"dokuwiki"}, [...]

and one container inside the page body:

<div class="plugin_fastwiki_marker" style="display:none"></div>

But that's it. There are no sectionedit buttons anywhere. I am using the default dokuwiki template and some other plugins that are not listed as conflicting tough.

https://www.dokuwiki.org/plugin:fastwiki reads like I do not have to adjust the template... or do I have to?! To be honest, I do not really understand https://www.dokuwiki.org/plugin:fastwiki:integration

It would be nice, if somebody could turn me in the right direction. Thanks! :)

zioth commented 5 years ago

The integration page is for plugin and template developers. Since you're using a supported template, you shouldn't have to worry about that.

Before you edited your post, you had "ACT":"denied" in there, which is strange. The page action should never be "denied." Is it possible that you're not logged in, or don't have permission to edit the page?

Just covering the stupid stuff before I dig deeper. :)

And is there any chance you could give me edit access to a page on your site? I might be able to debug a little.

mr-floppy commented 5 years ago

That I do not have to care about integration is good to know :) So right after clicking "install" I should be good to go?

Then I will try and create a new dokuwiki from scratch, just install fastwiki and see, if I can see buttons. Might take until the weekend though.

Sadly I cannot grant you access to the wiki, it is only published in our LAN. No web access allowed whatsoever, but thank you for the offer!

Regarding the "ACT":"denied": I have set the ACL back to the defaults. Now the complete script block looks like this:

<script type="text/javascript">/*<![CDATA[*/var NS='playground:testordner';var JSINFO = {"plugins":{"dropfiles":{"insertFileLink":1}},"fastwiki":{"secedit":1,"preview":1,"fastpages":1,"save":0,"fastshow":0,"fastshow_same_ns":1,"fastshow_include":"","fastshow_exclude":"","preload":false,"preload_head":"====[SOMESTRING]====","preload_batchsize":false,"preload_per_page":false,"locktime":840,"usedraft":1,"text_btn_show":"Seite anzeigen","templatename":"dokuwiki"},"schemes":["http","https","telnet","gopher","wais","ftp","ed2k","irc","ldap"],"move_renameokay":false,"isadmin":0,"isauth":0,"id":"playground:testordner:testseite","namespace":"playground:testordner","ACT":"show","useHeadingNavigation":0,"useHeadingContent":0}; /*!]]>*/</script>

But still no sectionedit buttons :( Not in Firefox, nor in IE Edge.

zioth commented 5 years ago

And if you uninstall fastwiki, the buttons reappear? I just tried fastwiki with the default template and the latest version of dokuwiki, and I saw the buttons.

What browser are you using? What version of doku?

mr-floppy commented 5 years ago

I was curious, so I have installed a new sandbox wiki right away.

The good news is, fastwiki is working as expected right out of the box. I clicked install and now every paragraph has a little edit button. Perfect :)

Tomorrow I will slowly install all the other addons from my production wiki to the sandbox and have a look what breaks it.

I will let you know as soon as I have found anything.

Thanks for the help!

P.S.: On the production wiki no browser shows edit buttons. They don't even get written to the source code. My best guess is there is some interference with another plugin, because the sandbox is on the exact same server with the exact same config (just a different folder) and it works.

zioth commented 5 years ago

I'm glad your sandbox works! Let me know which plugin broke fastwiki, and maybe it will be easy to fix.

I suggest you first try uninstalling fastwiki though, to make sure the buttons show up without it. Fastwiki doesn't delete the edit buttons -- it just modifies them using JavaScript.

mr-floppy commented 5 years ago

Fastwiki doesn't delete the edit buttons

Oh boy do I feel stupid right now. All this time I thought the sectionedit buttons were part of fastwiki... after reading your last post I found this https://www.dokuwiki.org/section_editing and maxseclevel was indeed at 0 facepalm

Now, with maxseclevel back to 3 I am abslutely loving it! fastwiki makes the whole dokuwiki experiene so much more agile! Thanks for inventing this and for the support!! 👍

Now I have just one little off-topic question: I would like to make the sectionedit buttons to look a little less prominent. Basically exactly like you did here http://zioth.com/wiki/playground2

I see that you have made the actual submit button transparent with .dokuwiki div.secedit input.button, .dokuwiki div.secedit button, but where did you feed the little pen icon onto the button?

mr-floppy commented 5 years ago

Nevermind the question about sectionedit buttons. I have snagged this pen from the noun project: https://thenounproject.com/search/?q=pen&i=2232338 And have pasted it into the _edit.css like this:

.dokuwiki div.secedit form.button:before {
        position:absolute;
        content:url(images/pen.png);
        color:transparent;
}

Looks nice and subtle and works like a charm :)

zioth commented 5 years ago

Glad to hear you figured everything out! I'm also glad to hear the problem wasn't my fault. :)

Enjoy the pen button. I don't like the default doku template, and put a lot of work into making my own unique one. That's what led me to fastwiki -- I wanted inline editing and faster page loads to improve the experience of my own site. I also replaced all the buttons in the edit toolbar with an icon font, so the editor would load faster. I suggested it to the Doku team, and I think they used it in some of the more recent versions.

Of the public templates, my favorite is Vector, which uses the MediaWiki (Wikipedia) look.

If you're looking for other doku streamlining, I recently created two more plugins: https://www.dokuwiki.org/plugin:autolink4 https://www.dokuwiki.org/plugin:autotooltip

mr-floppy commented 5 years ago

I'm a bit late, but thanks for the hints!

I in the meantime stumbled upon SprintDoc (https://www.dokuwiki.org/template:sprintdoc) and I'm quite happy with it. Looks nice and clean and it already has builtin pen buttons ;)

As for autolink4: I really like it, but for us, it produces way too many links, which is an issue with the way our articles are written. Not with your plugin. If you ever feel like realizing your vision to only link the first occurrence of a word, that would make it almost perfect :) Until then I just leave it installed and deactivated. So if you happen to update it sometime down the road, I will get notified ;)

Back to topic: The invisible button issue was totally my fault and can safely be closed.

zioth commented 5 years ago

I've opened a ticket to link only the first match: https://github.com/zioth/dokuwiki-autolink4/issues/4

Watch that issue to find out when it's fixed.

mr-floppy commented 5 years ago

Thanks again! Following https://github.com/zioth/dokuwiki-autolink4/issues/4, might indeed be more practical than having an idle plugin installed :)

zioth commented 5 years ago

I've added your feature. You caught me at a moment when I have some free time :)

mr-floppy commented 5 years ago

Well I am glad to have you provided with something to do then! Just kidding ;)

Your kind of support truely amazes me. If I knew how to buy you a cup of coffee, I'd probably do it!

zioth commented 5 years ago

Thanks! I'm not always this responsive. Depends on how real life is going. :)

I never looked into figuring out donation links. Maybe someday, but the $10/year I'd likely make off that has never seemed worth the effort.