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

Page narrows when editor activates #38

Closed winakeytoheaven closed 4 years ago

winakeytoheaven commented 4 years ago

Immediately after upgrading to rc2020-06-01 "Hogfather", I noticed that clicking the fastwiki EDIT button to edit a section results in my full-width pages (ie., no sidebar) being re-rendered in a narrower format, as if there were an invisible sidebar column to the left of the previous full-width page. This page-narrowing does NOT happen when editing a full page with the in-built editor. The editor, though visually narrowed, seems to work fine.

zioth commented 4 years ago

Fastwiki has custom code to support certain templates. I'm guessing that your template changed, resulting in the bug you're seeing.

Which template are you using? The Dokuwiki default, or something different?

winakeytoheaven commented 4 years ago

Thanks for your response.

I did not deliberately change the template from the default Dokuwiki template (which I’m still using) before upgrading to Hogfather. The screenshot shows my relevant theme settings. It is interesting that the page-width reduction when Fastwiki is in section-edit mode is about the content width you’d see if a left sidebar were being displayed. I have no sidebars enabled on the site, and I do all navigation through in-page links. Screen Shot 2020-06-25 at 8 25 15 PM I'm happy to supply any other information you might need.

rongcuid commented 4 years ago

I confirm this happens on my setup, on Dokuwiki default template without sidebar.

zioth commented 4 years ago

I just upgraded and tried it with the default template. When I do a section edit, the TOC is hidden, and the edit region takes up two columns - the content area, and the TOC area. This is as intended. Maybe I'm misunderstanding "full width pages." I'm not sure how to create those with the default template (since I use a custom one).

If you're seeing something different, could you post screenshots from before and after clicking the section edit button?

winakeytoheaven commented 4 years ago

I discoved that the issue is related to the Hogfather feature which can combine the JavaScript elements of all the various plugins into a single server download so as to be more efficient. Something about the fastwiki plugin (and a number of other plugins as well, particularly the indexmenu plugin) is broken by Hogfather's default action of combining the various JS downloads after the page's HTML has been parsed. Disabling the "defer_js" feature flag in the configuration settings fixes not only the fastwiki editing behavior, but also the JS-related brokenness I was seeing in the indexmenu plugin. I'm guessing that these plugins don't yet know how to cooperate with Hogfather's JS-combining mechanism, but they will at some point down the road and then I can turn ON the "defer_js" feature and enjoy the faster response.

rongcuid commented 4 years ago

I confirm disabling defer_js works around the problem.

zioth commented 4 years ago

Strange. defer_js does very little -- it just adds the "defer" attribute to script tags, causing them to be loaded after all of the HTML and CSS. Combining all JS into one file has been around for a very long time - at least since I started using Doku more than ten years ago.

I'll dig a little.

winakeytoheaven commented 4 years ago

Well, you know more about Dokuwiki than I do...but changing that setting seemed to be the workaround that worked, at least for the moment, and for two plugins I'm needing to have function properly. I'll be very interested to hear what you discover. Thanks for the work you're doing on this.

zioth commented 4 years ago

I still can't reproduce it. If you could answer a few questions, it might help me figure it out:

  1. Does it break again when you turn defer_js back on?
  2. What's the problem with indexmenu? I use that plugin too.
  3. Probably a pain, but could you send me a complete list of your installed plugins? If both @winakeytoheaven and @rongcuid could do that, maybe I could narrow it down, especially if you both use a plugin that I don't.
  4. Could you post screenshots of what the page looks like before and after you click a section-edit button?

I had some trouble getting hogfather to work myself. A couple plugins (including autolink4, which I wrote), as well as my custom template, were broken by the upgrade.

winakeytoheaven commented 4 years ago

With defer_js OFF, here is a screenshot of one of my pages:

Screenshot_2020-06-29 Information Technology  E360 Knowledgebase

Note the Adding a new Category title near the bottom. When I will click the Edit button to edit it, I see

Screenshot_2020-06-29 Information Technology  E360 Knowledgebase (1)

With defer_js back ON and doing the same thing, I see

Screenshot_2020-06-29 Information Technology  E360 Knowledgebase (2)

Bizarre, huh? Now, with defer_js OFF, let's look at the output of indexmenu:

Screenshot_2020-06-29 E360 Knowledgebase  E360 Knowledgebase

The output is visually normal AND the JS-powered functionality works for expanding/collapsing folders, etc.

With defer_js ON, the indexmenu rendering is

Screenshot_2020-06-29 E360 Knowledgebase  E360 Knowledgebase (1)

The links work (by normal HTML linking or JS-triggered linking, I don't know), but the rendering is not usual AND there is no JS-powered functionality at all.

At any rate, my site will continue with defer_js OFF until further notice

winakeytoheaven commented 4 years ago

I forgot to show you my installed plugins. Not all of them are actually used, but here they are:

Screenshot_2020-06-29 Extension Manager  E360 Knowledgebase

zioth commented 4 years ago

Thank you! One more thing, if you have a chance: With defer_js off, could you do the following?

Thanks!

winakeytoheaven commented 4 years ago

I followed your procedures and were no JS errors, either upon page refresh or after clicking the sectionedit button. I was hoping I'd have something hopeful for you. Hmmm.

I would be very happy to work with you in a more real-time manner to get to the bottom of your research. I am also a LAMP developer (but with more server-side than client-side background), so I'd be capable of cooperating well with you. I'd be happy to have one or more screen-sharing sessions with you using Zoom or something else. You can write me at winakeytoheaven at afomail dot net to set it up if you'd like to go that way. It might just turn days and days of back-and-forth into an hour or less. Just let me know.

winakeytoheaven commented 4 years ago

By the way, I re-enabled defer_js and repeated your process above. Again, no JS warnings or errors.

rongcuid commented 4 years ago

I am not web developer, but I notice that the <div class="pad group"> gives different width for different defer_js setting. With defer_js on, the width is narrower.

On my setup, there are no errors in console either.

zioth commented 4 years ago

Fixed. This turned out to have nothing to do with Hogfather or defer_js. Fastwiki was explicitly adding a sidebar during sectionedit when the sidebar was disabled. Not sure what the indexmenu issue is.

winakeytoheaven commented 4 years ago

Fantastic! I'm glad I could help...if that's what I did. You did all the sleuthing. I presume that the Extension Manager will show the availability of an update within a couple of days, right?

zioth commented 4 years ago

It should show it right away, since I updated both the github project's plugin.info.txt and the Doku plugin page.