FriendsOfTYPO3 / frontend_editing

TYPO3 CMS Frontend Editing
https://friendsoftypo3.github.io/frontend_editing/
102 stars 38 forks source link

Issues with links inside content element body #220

Closed webian closed 5 years ago

webian commented 7 years ago

Steps to reproduce:

  1. make a link in text while inline editing (using modal link browser)
  2. double click the link here modal link browser opens with possibility to remove the link
  3. save the editing
  4. double click the link again here modal link browser opens but without the possibility to remove the link

To remove the link the editor have to exactly select the text of the link (ending space included).

Another related weird behaviour is that, if we create another link without saving, now is possible to remove the link created in the previous steps simply using the CKEditor remove link button .

This also happens if we leave the cursor inside the link text and switch window (ALT+TAB in Windows) and come back to the frontend editing window to find that the "CKEditor remove link button" is enabled.

webian commented 7 years ago

I found out that the Link Browser displays the "Remove link" option before the save because at that moment the link is in linkHandler format t3://page?uid=35 and this is the right situation.

Unluckily after the save of the page obviously the link is rendered as a frontend link /index.php?id=35 then the Link Browser, that expect a linkHandler format, can't parse the link correctly.

A solution could be to render the links in linkHandler format while in Frontend Editing mode.

webian commented 7 years ago

Related to this issue, it happens that when we edit a text with an already saved link then an uncaught TYPO3 Exception is thrown on save:

#1460629247: No valid handlers found for type: unknown
TYPO3\CMS\Core\LinkHandling\Exception\UnknownLinkHandlerException thrown in file
typo3/sysext/core/Classes/LinkHandling/LinkService.php in line 154.
codesource commented 7 years ago

I can't reproduce the bug. Several bugs have since been corrected on the editor CKE.

Is it still relevant?

MattiasNilsson commented 7 years ago

This have been solved in later version of the CKEditor and the issue can now be closed.

gessulatgessulat commented 7 years ago

We still have this bug within the latest TYPO3 8.7.7 + CKEditor version if try to create an relative link with the link module. Same errormessage:

#1460629247: No valid handlers found for type: unknown
TYPO3\CMS\Core\LinkHandling\Exception\UnknownLinkHandlerException thrown in file
typo3/sysext/core/Classes/LinkHandling/LinkService.php in line 154.
webian commented 6 years ago

@MattiasNilsson @codesource I confirm that this issue is still present. I also can't imagine how you can't reproduce this. Did you save the edit? Because the bug appears after save, when the page is reloaded.

rorentz commented 6 years ago

Any news here ?

griesi007 commented 6 years ago

The issue is still present in 8.7.9

mmasmoudi commented 6 years ago

I have the same error, i try to save a text content element with a link inside.

nom10s commented 6 years ago

Still present in 8.7.10, but it seems related to the core / CKEditor: TYPO3 crashes reproducible when trying to save this code in CKEditor.

Linktext

Saving this code in a HTML content element works fine.

lorenzulrich commented 6 years ago

Still present in 8.7.12

ghost commented 6 years ago

Still present in 8.7.13

ghost commented 6 years ago

To work around this problem, I created a hook that corrects the link before saving, so that this error message no longer appears. Anyone interested? Then I create a GIST from it.

lorenzulrich commented 6 years ago

To work around this problem, I created a hook that corrects the link before saving, so that this error message no longer appears. Anyone interested? Then I create a GIST from it.

Here :-) Thanks!

MattiasNilsson commented 6 years ago

@devtroll Can you provide your hook? So I have something to start with.

MattiasNilsson commented 6 years ago

ping @devtroll

ghost commented 6 years ago

Here you will find the code snippet: https://bitbucket.org/snippets/scw_bihlmaier/5ezpaB

jealouskid commented 6 years ago

Thanks @devtroll for the workaround!

mabolek commented 5 years ago

@ghost @devtroll @lorenzulrich I have spent a lot of time trying to reproduce your issue in TYPO3 8.7.24, but it really seems to be impossible.

Please check the attached gif animation. Am I repeating the steps correctly?

frontend_editing_issue_220

mabolek commented 5 years ago

I am closing this ticket as no further information has been provided.