Project

General

Profile

Actions

Bug #71494

closed

Story #46140: Add configurable linkhandler for arbitrary records

image wizard in the rtehtmlarea

Added by stefan schreck over 8 years ago. Updated almost 6 years ago.

Status:
Closed
Priority:
Must have
Assignee:
Category:
RTE (rtehtmlarea + ckeditor)
Target version:
Start date:
2015-11-12
Due date:
% Done:

100%

Estimated time:
TYPO3 Version:
7
PHP Version:
5.5
Tags:
Complexity:
hard
Is Regression:
Yes
Sprint Focus:

Description

Typo3 7.6
Can't insert Image with the Link Wizard in the RTE html Area.
Wizard pops up but the click on the image won't insert the image source.
Best


Related issues 6 (1 open5 closed)

Related to TYPO3 Core - Bug #71832: htmlArea RTE insert Picture open Link DialogClosed2015-11-25

Actions
Related to TYPO3 Core - Bug #71298: Fix missing/broken RTE features after Link Handler API mergeAcceptedMarkus Klein2015-11-02

Actions
Related to TYPO3 Core - Bug #73657: Image wizard in the rtehtmlarea working again, but css-classes are not takenClosedMarkus Klein2016-02-24

Actions
Has duplicate TYPO3 Core - Bug #71643: RTE Insert images loading wrong popup contentClosed2015-11-18

Actions
Has duplicate TYPO3 Core - Bug #72592: rtehtmlarea: Inserting images not possibleClosed2016-01-08

Actions
Has duplicate TYPO3 Core - Bug #73094: Add image in RTE htmlareaClosed2016-02-03

Actions
Actions #1

Updated by Christopher Orth over 8 years ago

Can confirm that. Link Wizard opens when you click the "Insert Image" Button and you are unable to insert an image.

Actions #2

Updated by Kevin Ditscheid over 8 years ago

Can confirm that, too, on TYPO3 7.6.0

Actions #3

Updated by SoftPearls GmbH over 8 years ago

Additional information out of the Apache access log after clicking on the "Insert Image" Button: The request to route=/rte/wizard/image results in a HTTP 302 code and is forwarded to route=/wizard/link/browse .

(IP and domain name have been changed in the snippet from the access log.)

xxx.xxx.xxx.xxx - - [13/Nov/2015:21:08:44 +0100] "GET /typo3/index.php?route=%2Frte%2Fwizard%2Fimage&token=03e6cc5bbc19828756f7c91fafd1ad0b6aa9d933&&RTEtsConfigParams=tt_content%3A47%3Abodytext%3A9%3Atextmedia%3A9%3A&editorNo=data_tt_content__47__bodytext_&sys_language_content=0&contentTypo3Language=default HTTP/1.0" 302 670 "http://mydomain.de/typo3/index.php?route=%2Frecord%2Fedit&token=53412d9d2c45ed3f4e0f02fb6e5f189144f84370&edit[tt_content][47,]=edit&returnUrl=%2Ftypo3%2Findex.php%3FM%3Dweb_layout%26moduleToken%3D411c791386aebb653a7709b19bfd15e503ce2250%26id%3D9%23element-tt_content-47" "Mozilla/5.0 (X11; Linux x86_64; rv:42.0) Gecko/20100101 Firefox/42.0"
xxx.xxx.xxx.xxx - - [13/Nov/2015:21:08:44 +0100] "GET /typo3/index.php?route=%2Fwizard%2Flink%2Fbrowse&token=503e869e31a995bdee52d640ec5ce4ca2542827f&RTEtsConfigParams=tt_content%3A47%3Abodytext%3A9%3Atextmedia%3A9%3A&editorNo=data_tt_content__47__bodytext_&sys_language_content=0&contentTypo3Language=default HTTP/1.0" 200 6553 "http://mydomain.de/typo3/index.php?route=%2Frecord%2Fedit&token=53412d9d2c45ed3f4e0f02fb6e5f189144f84370&edit[tt_content][47,]=edit&returnUrl=%2Ftypo3%2Findex.php%3FM%3Dweb_layout%26moduleToken%3D411c791386aebb653a7709b19bfd15e503ce2250%26id%3D9%23element-tt_content-47" "Mozilla/5.0 (X11; Linux x86_64; rv:42.0) Gecko/20100101 Firefox/42.0"

Actions #4

Updated by Harald Dolderer over 8 years ago

  • Target version set to 7 LTS

it seems the ability to insert images in rte is broken.
Trying to drop an image into the rte window in TYPO3 7.6 fails and the accessability icons of new created links are also not shown. That's really a big problem because all images are deleted if you update a record.
Tested with latestest Versions Firefox and IE 11 and php 5.6

Actions #5

Updated by stefan schreck over 8 years ago

Furthermore is it NOT possible to set a File LINK on an image which was inserted with pure html.
Saving the RTE Window will lead to loss of the link data or the filemount url will not be converted
/?file:221

Right now RTE with Images is useless.
Thx
Best
Stefan

Actions #6

Updated by Harald Dolderer over 8 years ago

  • Assignee set to Benni Mack

seems nobody is working on this issue yet?
Stefan Schreck is right - RTE with images is absolute useless in 7.6.
This needs a quick solution. Is there anybody who can escalate this issue?
Thank you.

Actions #7

Updated by Anatoliy Balabanov over 8 years ago

The same problem.
7.6.0
PHP 5.6
Insert image not working in RTE. "insert link" wizard opens instead "insert image".

Actions #8

Updated by Markus Klein over 8 years ago

  • Status changed from New to Accepted
  • Assignee changed from Benni Mack to Markus Klein
  • Priority changed from Should have to Must have
  • Target version changed from 7 LTS to Candidate for patchlevel
  • Parent task set to #46140
Actions #9

Updated by Bastian Heiser over 8 years ago

Same Problem.

Actions #10

Updated by Markus Klein over 8 years ago

  • Target version changed from Candidate for patchlevel to 7.6.1
Actions #11

Updated by Gernot Ploiner over 8 years ago

Can confirm that.

Actions #12

Updated by Markus Klein over 8 years ago

  • Target version changed from 7.6.1 to Candidate for patchlevel
Actions #13

Updated by Markus Klein over 8 years ago

  • Target version changed from Candidate for patchlevel to 7.6.3
  • Complexity set to hard
Actions #14

Updated by Markus Klein over 8 years ago

  • Status changed from Accepted to In Progress
  • Is Regression changed from No to Yes
Actions #15

Updated by Gerrit Code Review over 8 years ago

  • Status changed from In Progress to Under Review

Patch set 1 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/45697

Actions #16

Updated by a. g. about 8 years ago

Patch set 1 don't work.
It throw errors in typo3/sysext/rtehtmlarea/Classes/Controller/SelectImageController.php

Actions #17

Updated by Markus Klein about 8 years ago

@a.g. Read the commit message please, which clearly states: "Not ready for review yet!!!"

Actions #18

Updated by Vasili Czelebski about 8 years ago

@Markus Klein: Hi, when this bug will be fixed?
This is one of the main functionality of the CMS. We need the ability to insert images from RTE.

Actions #19

Updated by Damien True about 8 years ago

When will this bug be fixed?
RTE without ability to insert images is absolute useless.

Actions #20

Updated by Loïc Stéphan about 8 years ago

We have the same problem.
Do you have an idea when will this bug be fixed ?

Thanks.

Actions #22

Updated by Markus Klein about 8 years ago

This Issue will finally be resolved tonight.

@Michael: Nope, this is not a JS issue... this needs a full rewrite for the new API, consider the existing code as totally broken.

Actions #23

Updated by Gerrit Code Review about 8 years ago

Patch set 2 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/45697

Actions #24

Updated by Matthias Eberlein about 8 years ago

Update to TYPO3 Version 7.6.3 Problem still exist...:-(

Actions #25

Updated by a. g. about 8 years ago

It's not fixed.
Throw error "PHP Fatal error: Arrays are not allowed in class constants in typo3\sysext\rtehtmlarea\Classes\Controller\SelectImageController.php on line 37".
Declaring const as array is allowed only on PHP 5.6+ (I have environment with PHP 5.5.12)

I fixed it on my instance, but i have another error:
"Fatal error: Uncaught exception 'TYPO3\CMS\Core\Error\Exception' with message 'PHP Catchable Fatal Error: Argument 2 passed to TYPO3\CMS\Recordlist\View\FolderUtilityRenderer::uploadForm() must be of the type array, string given, called in typo3\sysext\rtehtmlarea\Classes\ImageHandler\AddImageHandler.php on line 217 and defined in typo3\sysext\recordlist\Classes\View\FolderUtilityRenderer.php line 106' in typo3\sysext\core\Classes\Error\ErrorHandler.php on line 111"

Actions #26

Updated by Matthias Eberlein about 8 years ago

On TYPO3 git Master 8.0-dev same. Not working....

Actions #27

Updated by Hannes Lau about 8 years ago

The patch set is only 3 hours old. It has not been reviewed or accepted yet, so it won't be part of any release. Feel free to review: https://review.typo3.org/45697 .

Actions #28

Updated by Markus Klein about 8 years ago

Guys... thanks for your efforts, but please read up our conventions: The commit message says [WIP], which says "work in progress".
As long as a patch is WIP, there is no need to review it, unless explicitly asked for.

I pushed the current state to show that there is progress. The core team decided to not wait with today's release for this very patch, but to have another release rather soonish.
I will continue with the work on this patch tonight.

As soon as I consider it ready, I'll remove the WIP and I'm happy about many reviews then, I'll ping you here.
Cheers, Markus

Actions #29

Updated by Matthias Eberlein about 8 years ago

Hi Markus,
thanks for this Info...
Yes, i don's saw this[WIP] sorry.
Then we waiting for next updates.
Regards
Matthias

Actions #30

Updated by Gerrit Code Review about 8 years ago

Patch set 3 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/45697

Actions #31

Updated by Gerrit Code Review about 8 years ago

Patch set 4 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/45697

Actions #32

Updated by Gerrit Code Review about 8 years ago

Patch set 5 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/45697

Actions #33

Updated by Markus Klein about 8 years ago

Patch is open for reviews now.

Please don't forget to post your votes on gerrit. Login with your typo3.org username and use the Reply button at the top.
R+1 means "I read the code and consider it appropriate", V+1 means "I tested the code and it works as expected"

Thanks.

Actions #34

Updated by Ricky Mathew about 8 years ago

I put the patch. But i got the exception as following when i clicked on the image add button.

#1455499673: No image handlers are configured. Check page TSconfig RTE.default.buttons.image.options.imageHandler. (More information)

UnexpectedValueException thrown in file
/opt/lampp/htdocs/typo3_src-7.6.3/typo3/sysext/rtehtmlarea/Classes/Controller/SelectImageController.php in line 177.

Actions #35

Updated by Markus Klein about 8 years ago

You have to clear the system caches!

Actions #36

Updated by Gerrit Code Review about 8 years ago

Patch set 6 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/45697

Actions #37

Updated by Gerrit Code Review about 8 years ago

Patch set 7 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/45697

Actions #38

Updated by Ricky Mathew about 8 years ago

I still have an error in javascript "Uncaught TypeError: Cannot read property 'style' of null" on

rtehtmlarea/Resources/Public/JavaScript/EditImage.js at line 177 , which happens on imagewizard popup, so
that i can't still add image with the wizard.

Actions #39

Updated by Gerrit Code Review about 8 years ago

Patch set 8 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/45697

Actions #40

Updated by Markus Klein about 8 years ago

@Ricky: Did you test the latest patchset? I changed something in this regard.
Please comment on Gerrit directly about the patch and not here. Thanks.

Actions #41

Updated by Gerrit Code Review about 8 years ago

Patch set 9 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/45697

Actions #42

Updated by Gerrit Code Review about 8 years ago

Patch set 1 for branch TYPO3_7-6 of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/46826

Actions #43

Updated by Markus Klein about 8 years ago

  • Status changed from Under Review to Resolved
  • % Done changed from 0 to 100
Actions #44

Updated by Matthias Eberlein about 8 years ago

cool, it works...:-)
Many thank's to Markus Klein
Matthias

Actions #45

Updated by Jelle Groenendal about 8 years ago

Ricky Mathew wrote:

I put the patch. But i got the exception as following when i clicked on the image add button.

#1455499673: No image handlers are configured. Check page TSconfig RTE.default.buttons.image.options.imageHandler. (More information)

UnexpectedValueException thrown in file
/opt/lampp/htdocs/typo3_src-7.6.3/typo3/sysext/rtehtmlarea/Classes/Controller/SelectImageController.php in line 177.

I'm getting the same error after updating to 7.6.4.
Am i doing something wrong?

Uncaught TYPO3 Exception
#1455499673: No image handlers are configured. Check page TSconfig RTE.default.buttons.image.options.imageHandler. (More information)

UnexpectedValueException thrown in file
/var/www/site/typo3_src-7.6.4/typo3/sysext/rtehtmlarea/Classes/Controller/SelectImageController.php in line 177.

Actions #46

Updated by Markus Klein about 8 years ago

AS the error message already says "Check page TSconfig RTE.default.buttons.image.options.imageHandler".
What does the Info module say for RTE.default.buttons.image.options.imageHandler?
Make sure your RTE configuration does not kick RTE.default > away.

Actions #47

Updated by Jelle Groenendal about 8 years ago

I had to add the following to my RTE setup to make it work

RTE.default.buttons.image.options.imageHandler {
image {
handler = TYPO3\CMS\Rtehtmlarea\ImageHandler\EditImageHandler
label = LLL:EXT:rtehtmlarea/Resources/Private/Language/locallang_selectimagecontroller.xlf:currentImage
}
magic {
handler = TYPO3\CMS\Rtehtmlarea\ImageHandler\AddImageHandler
label = LLL:EXT:rtehtmlarea/Resources/Private/Language/locallang_selectimagecontroller.xlf:magicImage
displayAfter = image
scanAfter = image
}
plain {
handler = TYPO3\CMS\Rtehtmlarea\ImageHandler\AddImageHandler
label = LLL:EXT:rtehtmlarea/Resources/Private/Language/locallang_selectimagecontroller.xlf:plainImage
displayAfter = magic
scanAfter = magic
}
}

Actions #48

Updated by Jelle Groenendal about 8 years ago

RTE.default.buttons.image.options.imageHandler is not active in the Info module.
i dont clear the default anywhere.
That should mean the TS : /typo3_src-7.6.4/typo3/sysext/rtehtmlarea/Configuration/PageTSconfig/Image/pageTSConfig.txt
is not loading.
When i look in the code this is only loaded when basic.enableImages = 1.
This has been set within the plugin so it should be loaded.
When i remove the check nothing happens the problem still exists.

Actions #49

Updated by Markus Klein about 8 years ago

Then check your extensions... something must remove that ;-)

Actions #50

Updated by Jelle Groenendal about 8 years ago

RTE.default wasnt being cleared. RTE was being cleared. The introduction package uses an RTE setup that clears the entire RTE.

Actions #51

Updated by Markus Klein about 8 years ago

Oh dear... I guess it's the bootstrap_package used in there.
https://github.com/benjaminkott/bootstrap_package

Can you please file a bug report there or even provide a PR?

Actions #52

Updated by Jelle Groenendal about 8 years ago

Thats the one :P i filed an issue with this.
Could probably happen more often.
Thanks for the help!

Actions #53

Updated by Peter Morgner about 8 years ago

Markus Klein wrote:

Make sure your RTE configuration does not kick RTE.default > away.

This was the only reason in my configuration (V. 7.6.5) - after uncommenting "RTE.default >" it worked again.

Actions #54

Updated by Riccardo De Contardi over 6 years ago

  • Status changed from Resolved to Closed
Actions #55

Updated by Tashko Valkov almost 6 years ago

=====================================

Images in RTE for Typo3 ver. 7.6.26

=====================================

I had this issue but now it works in me.
This bug description helped me to solve this, especially the message #47 and #53.
Also the link https://docs.typo3.org/typo3cms/extensions/rtehtmlarea/DefaultConfigurations/Image/Index.html

-------------------------------------
Below are the steps how it was solved
-------------------------------------

1. Enable the showing images for RTE in Extension Manager (click Configure of the "rtehtmlarea" extension):
both fields "Enable images in the RTE" and "Enable additional inline elements"

2. Add in the PageTSConfig of the root page:

RTE.default {

Enable the image button
#showButtons := addToList(image)
showButtons := addToList(*)
Tags allowed outside p and div
Adding img tag to the default list
proc.allowTagsOutside := addToList(img)
Do not remove img tags
proc.entryHTMLparser_db.tags.img >

#this is for image size in BE and FE
buttons.image.options.magic.maxWidth = 800
buttons.image.options.magic.maxHeight = 800
buttons.image.options.plain.maxWidth = 800
buttons.image.options.plain.maxHeight = 800

}
#RTE.default.FE.showButtons < RTE.default.showButtons
#RTE.default.FE.proc.allowTagsOutside < RTE.default.proc.allowTagsOutside
#RTE.default.FE.proc.entryHTMLparser_db.tags.img >
------

#source: https://docs.typo3.org/typo3cms/extensions/rtehtmlarea/DefaultConfigurations/Image/Index.html

3. Now the button is shown but after click error appeared (error linked with the image handlers)
4. Add (below the above code) the following code to fix it:

This solves the issue "after click on image button error appears linked with the handlers"
RTE.default.buttons.image.options.imageHandler {
image {
handler = TYPO3\CMS\Rtehtmlarea\ImageHandler\EditImageHandler
label = LLL:EXT:rtehtmlarea/Resources/Private/Language/locallang_selectimagecontroller.xlf:currentImage
}
magic {
handler = TYPO3\CMS\Rtehtmlarea\ImageHandler\AddImageHandler
label = LLL:EXT:rtehtmlarea/Resources/Private/Language/locallang_selectimagecontroller.xlf:magicImage
displayAfter = image
scanAfter = image
}
plain {
handler = TYPO3\CMS\Rtehtmlarea\ImageHandler\AddImageHandler
label = LLL:EXT:rtehtmlarea/Resources/Private/Language/locallang_selectimagecontroller.xlf:plainImage
displayAfter = magic
scanAfter = magic
}
}

#---------
#source: https://forge.typo3.org/issues/71494 - solution #47

5. Now the image can be added but can't be save
6. Add (at the top of the all codes above) the following code to fix it:

this solves the issue "image is added but can't be saved"
RTE.default >

#---------
#source: https://forge.typo3.org/issues/71494 - solution #53

7. The whole result code from above.
(Add it in PageTSConfig of the root page):

RTE.default >

RTE.default {
showButtons := addToList(*)
proc.allowTagsOutside := addToList(img)
proc.entryHTMLparser_db.tags.img >

#this is for image size in BE and FE
buttons.image.options.magic.maxWidth = 800
buttons.image.options.magic.maxHeight = 800
buttons.image.options.plain.maxWidth = 800
buttons.image.options.plain.maxHeight = 800
}

RTE.default.buttons.image.options.imageHandler {
image {
handler = TYPO3\CMS\Rtehtmlarea\ImageHandler\EditImageHandler
label = LLL:EXT:rtehtmlarea/Resources/Private/Language/locallang_selectimagecontroller.xlf:currentImage
}
magic {
handler = TYPO3\CMS\Rtehtmlarea\ImageHandler\AddImageHandler
label = LLL:EXT:rtehtmlarea/Resources/Private/Language/locallang_selectimagecontroller.xlf:magicImage
displayAfter = image
scanAfter = image
}
plain {
handler = TYPO3\CMS\Rtehtmlarea\ImageHandler\AddImageHandler
label = LLL:EXT:rtehtmlarea/Resources/Private/Language/locallang_selectimagecontroller.xlf:plainImage
displayAfter = magic
scanAfter = magic
}
}

==============

8. In Resume: now it's working in RTE of CE Text&Media and in the "news" extension records.
Of course, I've just done this so I need to test if the RTE would work good in the next days but in all cases it seems to work now.

Actions #56

Updated by Tashko Valkov almost 6 years ago

=============================================================

This is the whole working code from the previous my message
(see it if you need detailed description)
(also enable the showing images for RTE in Extension Manager (click Configure of the "rtehtmlarea" extension):
both fields "Enable images in the RTE" and "Enable additional inline elements")

=============================================================
This solves the issue and you have images in RTE for CE Text&Media and news extension records.
Add it in PageTSConfig of the root page.
-----------------------------------------------------------------------------------------------

RTE.default >

RTE.default {
showButtons := addToList(*)
proc.allowTagsOutside := addToList(img)
proc.entryHTMLparser_db.tags.img >

#this is for image size in BE and FE
buttons.image.options.magic.maxWidth = 800
buttons.image.options.magic.maxHeight = 800
buttons.image.options.plain.maxWidth = 800
buttons.image.options.plain.maxHeight = 800
}

RTE.default.buttons.image.options.imageHandler {
image {
handler = TYPO3\CMS\Rtehtmlarea\ImageHandler\EditImageHandler
label = LLL:EXT:rtehtmlarea/Resources/Private/Language/locallang_selectimagecontroller.xlf:currentImage
}
magic {
handler = TYPO3\CMS\Rtehtmlarea\ImageHandler\AddImageHandler
label = LLL:EXT:rtehtmlarea/Resources/Private/Language/locallang_selectimagecontroller.xlf:magicImage
displayAfter = image
scanAfter = image
}
plain {
handler = TYPO3\CMS\Rtehtmlarea\ImageHandler\AddImageHandler
label = LLL:EXT:rtehtmlarea/Resources/Private/Language/locallang_selectimagecontroller.xlf:plainImage
displayAfter = magic
scanAfter = magic
}
}

Actions

Also available in: Atom PDF