masakik / headerfooter2

Modificatios over headerfooter improved plugin for dokuwiki
1 stars 0 forks source link

plugin breaks DokuWiki section editing #2

Open fthommen opened 5 years ago

fthommen commented 5 years ago

Hi,

when I have a headerfile in place, DW's section editing is broken. When editing a section, the beginning and end of the section are not correctly detected. The editor shows me a text block which starts and ends later than the actual section.

E.g. when editing this section

====== test ======
line1

line2

line3

The editor shows me

=== test ======
line1

line2

line3

==

instead. The trailing == are probably from the next header. In the example, _header.txt contained a simple A.

saving such an edit completely breaks the headers. Do you have any idea where this comes from and how it can be fixed?

Thanks

masakik commented 5 years ago

Hi, witch version of dokuwiki are you using? I´m stil using 2017-02-19e and it works fine.

masakik commented 5 years ago

Another try is to deactivate this plugin and check what happens to make sure it is causing the issue.

fthommen commented 5 years ago

Another try is to deactivate this plugin and check what happens to make sure it is causing the issue.

I've already done that. It is the plugin. We are using the newest DW version (2018-04-22b "Greebo"). I think the problem is the one described on https://www.dokuwiki.org/devel:event:parser_wikitext_preprocess:

_Note that modifying the data might change section positions, which in turn would break section editing if not fixed in PARSER_HANDLER_DONE._

Unfortunately fixing this exceeds my PHP and DokuWiki knowledge :-)

fthommen commented 4 years ago

Hello, did you already have time to look into this problem?

masakik commented 4 years ago

Hi, I check that it happens on greebo but not on Frusterick. I am investigating why this is happening. Edit: it happens on Frusterick too but I havent noticed earlier.

masakik commented 4 years ago

Hi, checking again I realized what is happening. It is true that this breaks section editing. On each section edit button there is a hidden field called range that contains first and last byte offset of the section and the plugin insert and offset to this range. Unfortunately I don´t know how to prevent this to happen. I will digg on google to find out a solution.

fthommen commented 4 years ago

Hello, have you had time to look into this issue?

Juergen-aus-Zuendorf commented 4 years ago

Great plugin! I use the plugin on many pages of our company wiki. But for the reason mentioned above I only use the footer functionality so far. And I always hope that there are no other things happening in the background with any side effects.