Not logged in. · Lost password · Register
Forum: General Help and Support Plugins RSS
hiddenheader-plugin: problems with section edit, break of span-tags, anchor-rerendering
Page:  previous  1  2 
Avatar
Samana Johann #16
Member since Jun 2018 · 123 posts · Location: Aural/Cambodia
Group memberships: Members
Show profile · Link to this post
In reply to post ID 63655
Sadhu for the care and share in all directions.

Just one thing, if it is so, that this code renders both id and anchor-link, why would it (didn't) not match (e.g. change the id, Both, for headers and anchors, before.)?
This post was edited on 2018-11-17, 14:07 by Samana Johann.
Avatar
Krecik #17
Member since Jun 2018 · 5 posts
Group memberships: Members
Show profile · Link to this post
In reply to post ID 63655
Quote by Krecik:
I will try to open an issue in DokuWiki GitHub later and ask why this "sectionID" function removes dots and colons, and if that is really necessary for something. Maybe they come to the conclusion that it is not really needed and change it.

https://github.com/splitbrain/dokuwiki/issues/2580
Avatar
Samana Johann #18
Member since Jun 2018 · 123 posts · Location: Aural/Cambodia
Group memberships: Members
Show profile · Link to this post
The section-include function with the include-plugin does no more match the single section and returns now the whole source page.

sample: http://accesstoinsight.eu/km/tipitaka/vin/mv/vin.mv.01.03

{{section>km:tipitaka:book_006#៣. មុចលិន្ទកថា&nouser&nodate&noheader&noeditbutton&readmore}}

My person still thinks that there are two actions involved, one rendering IDs and one Anchor-Links, and that hidden-plugin left something behind in the sphere of the ID-rendering. (independent of the matter ".", ":" or not in the DW-complex)

The remove of the ID-replacement in regard of . : might effect other plugins as well, dealing with headers.


Seemingly was a cache-matter. After saving the settingpage all fine.
This post was edited on 2018-11-18, 09:42 by Samana Johann.
Avatar
pop #19
Member since Nov 2016 · 49 posts
Group memberships: Members
Show profile · Link to this post
In reply to post ID 63573
Quote by Samana Johann on 2018-11-12, 05:10:
Not having found any reason or solution, and since it effects sectionheader-links as well, my person thought to share a sample-page on the case.

What ever hints to solve it are appreciated.

Hello. I am using Opera. This browser resolves Anchorlink: mv.01.01 correctly into: http://accesstoinsight.eu/playground/playground/anchor#mv.01.01, i.e. a complete URL with dots in the section part.

It shows the correct URL in the status line at the bottom of the screen when I place the cursor on the link. When I click on the link, the browser shows the correct page. The address field shows the correct URL with all dots within the section name.

I live in Switzerland and my browser is configured to support English and German.
Avatar
Samana Johann #20
Member since Jun 2018 · 123 posts · Location: Aural/Cambodia
Group memberships: Members
Show profile · Link to this post
Appreciation for care and giving info, Mr. Pop. Since Mr. Moritz (Krecik) changed a certain replacement in inc/pageutils.php as a individual case solution (see post before), it works fine now. But still the very root of the case is not found.

Und Grüa'zi miteinonder in di Schwiez.
This post was edited on 2018-11-18, 10:35 by Samana Johann.
Avatar
Krecik #21
Member since Jun 2018 · 5 posts
Group memberships: Members
Show profile · Link to this post
In reply to post #16
Quote by Samana Johann:
Just one thing, if it is so, that this code renders both id and anchor-link, why would it (didn't) not match (e.g. change the id, Both, for headers and anchors, before.)?
Oh, I did not read this before.

What I wrote was not very clear. What I meant was that both
1. id of section anchors (i.e. the id of the heading defined with "==== Section Title ====" syntax in Wiki code)
2. and the anchor (behind '#') part of DokuWiki internal links, i.e.: "[[namespace:page#id]]"
are processed by the same function "sectionID" (which removes the dots)

Anchorlink: [[#mv.01.01]]
would become (simplified):
<a href="#mv0101">mv.01.01</a>

and

==== mv.01.02 ====
would become (simplified)
<h2 id="mv0102">mv.01.02</h2>
(dots removed)

This is only for the standard DokuWiki syntax of sections and internal links, which are modified by the "sectionID" function.

But there other ways of defining anchor ids directly, like this from the example you gave on the test page (I think this is using the wrap plugin):
<span #mv.01.01>Text with anchor id mv.01.01</span>
will become/stay
<span id="mv.01.01">Text with anchor id mv.01.01</span>
(dots not removed)

The wrap plugin '#' syntax directly sets the id of an element without removing any dots or changing anything. But one can not link to them with standard DokuWiki "[[namespace:page#id]]" internal link syntax if there are dots. It is a bit confusing that it looks very similar to the DokuWiki internal link syntax with the hash '#' character.

Maybe that is where the original problem here came from (at least that is the problem that the test page illustrates): section header ids and internal links defined with normal Wiki syntax are processed by the "sectionID" function. And so of course they both match (removing the dots). The problem comes in when one has other ids defined not through Wiki sections, which contain dots, like the last example here with the wrap plugin.

But all this has not much to do with the Hidden Header plugin. A hidden header would render the id in the same way as a normal header. (with dots removed in current standard DokuWiki)
Avatar
Samana Johann #22
Member since Jun 2018 · 123 posts · Location: Aural/Cambodia
Group memberships: Members
Show profile · Link to this post
Such was thought and to prove it my person made the test-page where the phenomena not only arose for a special anchor link but also for the headers which get their links in the index which could not match the header-anchors as well before.

But, my person thinks, after the insert-plugin section phenomena (striked out below), that it is all a matter of what ever chache deleting might have solved it.

Sadhu for the care.
Close Smaller – Larger + Reply to this post:
Verification code: VeriCode Please enter the word from the image into the text field below. (Type the letters only, lower case is okay.)
Smileys: :-) ;-) :-D :-p :blush: :cool: :rolleyes: :huh: :-/ <_< :-( :'( :#: :scared: 8-( :nuts: :-O
Special characters:
Page:  previous  1  2 
Go to forum
Imprint
This board is powered by the Unclassified NewsBoard software, 20150713-dev, © 2003-2015 by Yves Goergen
Current time: 2018-12-16, 07:06:18 (UTC +01:00)