featdd / dpn_glossary

Glossary extension for TYPO3
http://typo3.org/extensions/repository/view/dpn_glossary
GNU General Public License v2.0
20 stars 31 forks source link

Links in term mode 'Link' do not lead to the defined page #200

Closed projektil-werbeagentur closed 1 year ago

projektil-werbeagentur commented 1 year ago

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:

Bildschirmfoto 2023-08-22 um 12 09 27 Bildschirmfoto 2023-08-22 um 12 10 18

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

featdd commented 1 year ago

Hi @projektil-werbeagentur,

sorry for the late reply, is this still the case? Have you changed something on the termWrap TypoScript?

Greetings Daniel

projektil-werbeagentur commented 1 year ago

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.

Bildschirmfoto 2023-10-17 um 09 59 41

The link "Dichte" is of type Link, all others of type default:

Bildschirmfoto 2023-10-17 um 09 46 01

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

Bildschirmfoto 2023-10-17 um 09 50 03

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

PeterProell commented 1 year ago

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

featdd commented 1 year ago

Yes I could reproduce this too now.

This worked sometime ago, need some time to fix this strange TypoScript construct.

Greetings Daniel

featdd commented 1 year ago

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: 9140e9b7f99ec8a22f9e94908b3e76c7d7823cef

I will prepare an update soon, thanks for your patients.

Greetings Daniel

featdd commented 1 year ago

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: ed4bec5049a5261354ed8c808877cf78906d7d7b

Greetings Daniel

projektil-werbeagentur commented 1 year ago

Hi Daniel,

many thanks for the corrections and improvements, now it works as expected :)

Best regards Christian

Am 30.10.2023 um 16:00 schrieb Daniel Dorndorf @.***>:

Hi @projektil-werbeagentur https://github.com/projektil-werbeagentur & @PeterProell https://github.com/PeterProell,

I optimized this even a bit further with simply using the slug for the anchor link, making at also configurable. See: ed4bec5 https://github.com/featdd/dpn_glossary/commit/ed4bec5049a5261354ed8c808877cf78906d7d7b Greetings Daniel

— Reply to this email directly, view it on GitHub https://github.com/featdd/dpn_glossary/issues/200#issuecomment-1785408663, or unsubscribe https://github.com/notifications/unsubscribe-auth/A44OYJODBEXLOTBTXNWKQ43YB66I5AVCNFSM6AAAAAA3ZVTDF2VHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTOOBVGQYDQNRWGM. You are receiving this because you were mentioned.