-
Notifications
You must be signed in to change notification settings - Fork 4
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
Better compatibility with include plugin #91
Comments
Combo makes a difference between a document and a fragment.
I don’t know how include works but combostrap captures and deletes the heading 1 when a template as a main header otherwise you would see it twice. A fragment with a heading 1 is a non-sense because you can have only one by page otherwise you messed up with the assistance technology. To solve this equation with combostrap:
That’s all. |
I am trying to include fragments of other pages starting with a heading 2, like #text, #translation and #purport. One can also include pages with sections relative to the main document, but that's beyond the point, which is that I only want a portion of the page to be included in other pages, but it doesn't work. The full page is included, which is not at all what we want... |
I have a test that pass. If you can create a little test that does not pass, I can test it. just 2 pages: one with the include and the included page. |
The test that I have is |
I will get to that, but so far I have only ever used |
Does this count as a test...? |
It works with the include version of |
Which template do you use for the pages? |
I have tested with a |
This is the generated HTML And it's messed up. They add some buttons but the selection is there. <section class="outline-section-cs outline-level-0-cs section-cs">
<section class="outline-section-cs outline-level-1-cs section-cs">
<h1 id="test">Test</h1>
</div>
<div class="edit-button-cs editbutton_plugin_include_start">
<form id="" method="post" action="/doku.php?id=include_test">
<input name="target" type="hidden" value="plugin_include_start"/><input name="secid" type="hidden"
value="1"/><input name="range"
type="hidden"
value="0-"/><input
name="summary" type="hidden" value="include_reference"/><input name="rev" type="hidden"
value="1712501437"/>
<input name="do" type="hidden" value="edit"/>
<button type="submit" title="include_reference">
</button>
</form>
</div>
<div class="plugin_include_content plugin_include__include_reference">
<div class="level1">
<h2 id="section_to_include">Section to Include</h2>
<p>
The section test1 was included from the include-plugin-test page.
</p>
</section>
<section class="outline-section-cs outline-level-2-cs section-cs">
<div class="edit-button-cs editbutton_plugin_include_editbtn">
<form id="" method="post" action="/doku.php?id=include_test">
<input name="target" type="hidden" value="plugin_include_editbtn"/><input name="secid" type="hidden"
value="3"/><input name="range"
type="hidden"
value="0-"/><input
name="summary" type="hidden" value="Section to Include"/><input name="rev" type="hidden"
value="1712501437"/>
<input name="do" type="hidden" value="edit"/>
<button type="submit" title="Section to Include">
</button>
</form>
</div>
<div class="inclmeta level2">
</div>
</div>
<div class="edit-button-cs editbutton_plugin_include_end">
<form id="" method="post" action="/doku.php?id=include_test">
<input name="target" type="hidden" value="plugin_include_end"/><input name="secid" type="hidden"
value="2"/><input name="range"
type="hidden"
value="0-"/><input
name="summary" type="hidden" value="include_reference"/><input name="rev" type="hidden"
value="1712501437"/>
<input name="do" type="hidden" value="edit"/>
<button type="submit" title="include_reference">
</button>
</form>
</div>
</div>
<div class="level1">
</section>
</section> |
To go further, I would need a reproducer (ie a standard Combostrap installation with the last include plugin and nothing more) |
Here the proof on our demo website. |
Well, if I turn the ComboStrap heading config off, then it works. But with the heading syntax on, it fails. However, this makes autotoc and other features of ComboStrap fail...? |
Do you have the Combo heading config on or off? |
Off. I can give you access to the demo website if you want. Heading disabled is not standard and we may have missed some integration problem. |
When i turn it off, all my pages auto toc display other content than what is is supposed... |
I think because autotoc grabs the headings from ComboStrap, so turning headings off means it no longer work as intended...? |
What is that autotoc? |
I mean the toc that ComboStrap builds up in the right sidebar. Mine gets all garbled up when I turn off the ComboStrap heading config... |
Ah. I thought that it was another plugin. Yes that's right. The capture of the label was not good. |
Fantastic! One issue I have come across is with https://dokuwiki.org/plugin:simplenavi, that now all of a sudden doesn't display the title of the page, but the next heading (h2) in page listing. |
Not just in the simplenavi plugin either, but the page explorer as well... Seems internal heading title just went missing. Edit: I do not have json headers for all pages, but that should not be necessary to catch the first heading?' Edit 2: Just remember that I am using the "label" field for my page explorer navigation. Maybe that has some unintended side effects. But the simplenavi plugin should still work... |
Yet another issue, is that the popup tooltips remove each instance of the title in the description. |
There was a conflict with the I test it, with the 2 changes that I made, I have reverted the dokuwiki behaviour. |
We don't support simplenavi because we have already one component: |
Could you add one more include section to the test? When I have more than one include on the page, each under their own subheading, it messes up the layout and TOC... |
Like this (sorry for bad test):
|
Here is an actual page that I'm using, if that works as a test. |
Yeah as I said the inserted html from include is not correct. I can't do anything about that. The browser applies some corrections (assumptions). |
They insert a button. May be there is an option to disable it. It seems that it's this button that messed things up. |
They insert a button for editing sections. It is possible to turn off in config, but there seems to be some issue with that yes... |
I tried to hack the include plugin and remove its section edit button, but things still didn't work as I had hoped... |
Looking at the code, it seems to me the edit buttons are used by both cs and include plugin?
|
Looking at the code again, it seems the include plugin just outputs its html outside the main section. Moving it into the right place (div#main-content) fixes the whole issue. Who controls this, DokuWiki, ComboStrap or the plugin itself? If I know where to look, maybe I can fix it... |
I have gone through the code of the include plugin, disabling whatever I think might cause an issue, with no luck. I think that ComboStrap must be making that div#main-content, but the include plugin outputs its html outside that div. Any chance of ComboStrap being able to steer the include to input its html inside the correct div#main-content tag? Or has this any other implications, and the fault is solely with the include plugin? |
But shouldn't the include content still get included inside main-content? Then it works perfectly... |
Dokuwiki is cool but as you don't have the notion of block or inline. These edge cases are fucking nuts. The parser is null. |
The thing is that because the HTML is not a valid XML. The browser makes modification that messed up with the CSS (styling). |
May be you need to wrap your include section ? All the best |
Wow, thanks! I didn't expect such detailed breakdown. Yes, I will try to wrap, and I will try to fix the include plugin somehow if that is the culprit. And as per your link, it seems that is so indeed. Sorry for all the extra work, and all the best to you too. :) |
Adding the |
Edit: I'm talking about the "include section" functionality, not including the full page. But that also has some issues...
For quite some time, this functionality was not working, to my frustration. But recently I found out that include plugin has an issue with the way ComboStrap handles, or takes over, headings. I thought it would be simple to just disable the heading setting in ComboStrap, as I don't use any extra syntax, and let DokuWiki display what it usually would. But that wasn't exactly without issues.
So now I'm torn between restoring the include plugin functionality, which is a crucial part of my setup, or keep using ComboStrap. And of course I can't just drop ComboStrap, as I'm already heavily invested in many of the other features that it offers. Although if there was a theme offering the same database functionality, but leaves DokuWiki's handling of headings (and links) alone, I would jump ship. That is all I need really, less combo, more strap...
At least it the developer can explain the rationale for breaking compability with this feature, and if there is a way to work around it. Personally I don't need ComboStrap to display my document headings, as I already have headings in all my documents. But I still want autotoc and other features to work properly.
Include is a crucial part to many wikis, similar to namespace templates. For the longest time this functionality was absent, but now that I know why, I am very much eager to have it working again. Maybe includes could be brought in after page render, so it doesn't mess with the active page's meta data. This is also another issue, as including pages also include their json headers by default.
Please consider my plea for help. Thanks!
The text was updated successfully, but these errors were encountered: