Links in term mode 'Link' do not lead to the defined page
projektil-werbeagentur opened this issue · comments
Hi,
as of version 4.2.0, clicking on a parsed link does not lead to the page defined with the term, instead you remain on the page with the link and the term is appended to the URL with # as an anchor:
With version 4.1.0 the linking works as expected.
Using:
Typo3: 11.5.30
PHP version: 8.0.29
dpn_glossary: 4.1.0, 4.2.0, 5.0.3
sorry for the late reply, is this still the case?
Have you changed something on the termWrap TypoScript?
Greetings
Daniel
Hi @featdd,
Yes, the problem still exists as described.
Nothing has been changed in the extension's standard typoscript, except for the path to the template files.
The incorrect behaviour can be viewed on this page, for example:
https://www.ego.de/produkte/butyl
Below the heading "Butylqualitäten" in the bulleted list, all links are glossary entries.
The link "Dichte" is of type Link, all others of type default:
For "Dichte", the term is appended to the current page URL with #. The link does not go to the defined target page as expected: https://www.ego.de/produktsuche/dichterechner
On the glossary overview page at https://www.ego.de/service/dichtstofflexikon, the behaviour is partially correct when looking at the term „Dichte". The heading links to the defined target page, the link „Dichte" in the description text, which is generated via the parser, links to the current page with #Dichte.
If further information is needed, please contact me.
Using:
Typo3: 11.5.32
PHP version: 8.0.30
dpn_glossary: 5.0.3
I can confirm this. Just hit the same problem.
Even stranger. If the term consists of two words (like "Douglas McGregor") the link will have href="#Douglas" and target="McGregor".
Using:
TYPO3 12.4.7
PHP 8.2
dpn_glossary 5.0.3
Yes I could reproduce this too now.
This worked sometime ago, need some time to fix this strange TypoScript construct.
Greetings
Daniel
Hi @projektil-werbeagentur & @PeterProell,
I finally managed to fix this, I almost went crazy thinking of a TypoScript issue but it was completely fine.
The introduction of the ParserTerm removed the term link from the content object data array... 🤦♂️
(Also optimized the anchor link generation)
solved here: 9140e9b
I will prepare an update soon, thanks for your patients.
Greetings
Daniel
Hi @projektil-werbeagentur & @PeterProell,
I optimized this even a bit further with simply using the slug for the anchor link, making at also configurable.
See: ed4bec5
Greetings
Daniel