TinyMCE: Insert file does not work with php 8

Have a question or a suggestion about a 3rd party addon module or plugin?
Let us know here.
Post Reply
Callisto58
New Member
New Member
Posts: 5
Joined: Wed Mar 23, 2022 9:18 am

TinyMCE: Insert file does not work with php 8

Post by Callisto58 »

When I want to insert a file or image, only an empty window appears in the file upload window (insert file / filemanager).
User avatar
DIGI3
Dev Team Member
Dev Team Member
Posts: 1627
Joined: Wed Feb 25, 2009 4:25 am
Location: Victoria, BC

Re: TinyMCE: Insert file does not work with php 8

Post by DIGI3 »

Looks like this has already been reported here: http://dev.cmsmadesimple.org/bug/view/12549
Not getting the answer you need? CMSMS support options
antibart
Power Poster
Power Poster
Posts: 1155
Joined: Sun Aug 17, 2008 9:29 am

Re: TinyMCE: Insert file does not work with php 8

Post by antibart »

DIGI3 wrote: Tue Jun 21, 2022 1:40 pm Looks like this has already been reported here: http://dev.cmsmadesimple.org/bug/view/12549
Yes, it is reported since june 2022 without any solution. The current version of TinyMCE is 6.3. The latest TinyMCE version in cmsms is 3.3.2., which is pretty old.

I have the same problem after changing to php 8.0..

In most cases I see an empty filemanager popup. But in one case I get an error report:

Fatal error: Uncaught ValueError: mb_http_input(): Argument #1 ($type) must be one of "G", "P", "C", "S", "I", or "L" in /homepages/5/xxx/htdocs/xxx/modules/TinyMCE/responsive_filemanager/filemanager/config/config.php:9 Stack trace: #0 /homepages/5/xxx/htdocs/xxx/modules/TinyMCE/responsive_filemanager/filemanager/config/config.php(9): mb_http_input('UTF-8') #1 /homepages/5/xxx/htdocs/xxx/modules/TinyMCE/responsive_filemanager/filemanager/dialog.php(4): include('/homepages/5/...') #2 {main} thrown in /homepages/5/xxx/htdocs/xxx/modules/TinyMCE/responsive_filemanager/filemanager/config/config.php on line 9.

There are some fixes
https://github.com/trippo/ResponsiveFil ... issues/673

... but finally it is not future-oriented to make a DIY-fix on a three years old version.
antibart
Power Poster
Power Poster
Posts: 1155
Joined: Sun Aug 17, 2008 9:29 am

Re: TinyMCE: Insert file does not work with php 8

Post by antibart »

An update would be better, but this answer works for me

https://github.com/trippo/ResponsiveFil ... -936140658

In cmsms mb_http_input is line 9 in TinyMCE/responsive_filemanager/filemanager/config/config.php, not 49.
User avatar
DIGI3
Dev Team Member
Dev Team Member
Posts: 1627
Joined: Wed Feb 25, 2009 4:25 am
Location: Victoria, BC

Re: TinyMCE: Insert file does not work with php 8

Post by DIGI3 »

An update would be most welcome. Unfortunately the developer passed away last year, and the other people on the project are no longer active. If anyone is willing to take it on they should get in touch with me or another Dev Team member.
Not getting the answer you need? CMSMS support options
antibart
Power Poster
Power Poster
Posts: 1155
Joined: Sun Aug 17, 2008 9:29 am

Re: TinyMCE: Insert file does not work with php 8

Post by antibart »

DIGI3 wrote: Wed Jan 18, 2023 3:32 pm Unfortunately the developer passed away last year
Oh. Sad news. :(
jog
Forum Members
Forum Members
Posts: 27
Joined: Tue Aug 28, 2007 11:03 am

Re: TinyMCE: Insert file does not work with php 8

Post by jog »

Sad news indeed.

I tried the above workaround and can't get it to work with PHP 8.0+ – could someone please post the modified files and/or the steps required?
antibart
Power Poster
Power Poster
Posts: 1155
Joined: Sun Aug 17, 2008 9:29 am

Re: TinyMCE: Insert file does not work with php 8

Post by antibart »

jog wrote: Mon Jan 23, 2023 7:23 am – could someone please post the modified files and/or the steps required?
With this modifications it works for me: http://dev.cmsmadesimple.org/bug/view/12549
jog
Forum Members
Forum Members
Posts: 27
Joined: Tue Aug 28, 2007 11:03 am

Re: TinyMCE: Insert file does not work with php 8

Post by jog »

Thank you very much! This fix works with PHP 8.1.13 on two separate installations.
User avatar
DIGI3
Dev Team Member
Dev Team Member
Posts: 1627
Joined: Wed Feb 25, 2009 4:25 am
Location: Victoria, BC

Re: TinyMCE: Insert file does not work with php 8

Post by DIGI3 »

Technically our forum rules do not allow posting of code changes, these need to go on the forge. Because support for this module has lapsed we will leave it up for a while, but please consider moving it to the forge then editing your post with a link to it.
Not getting the answer you need? CMSMS support options
antibart
Power Poster
Power Poster
Posts: 1155
Joined: Sun Aug 17, 2008 9:29 am

Re: TinyMCE: Insert file does not work with php 8

Post by antibart »

DIGI3 wrote: Mon Jan 23, 2023 3:01 pm Technically our forum rules do not allow posting of code changes, these need to go on the forge. Because support for this module has lapsed we will leave it up for a while, but please consider moving it to the forge then editing your post with a link to it.
Sorry for that.

I can move the code modifications to the forge. But the time to edit my last post is over.

Here is the link to the forge:

http://dev.cmsmadesimple.org/bug/view/12549

Now anybody could delete my post.

---
User avatar
DIGI3
Dev Team Member
Dev Team Member
Posts: 1627
Joined: Wed Feb 25, 2009 4:25 am
Location: Victoria, BC

Re: TinyMCE: Insert file does not work with php 8

Post by DIGI3 »

Thanks, all sorted!
Not getting the answer you need? CMSMS support options
Callisto58
New Member
New Member
Posts: 5
Joined: Wed Mar 23, 2022 9:18 am

Re: TinyMCE: Insert file does not work with php 8

Post by Callisto58 »

Thanks antibart for the solution. works perfect!
Post Reply

Return to “Modules/Add-Ons”