CMS MADE SIMPLE FORGE

TinyMCE

 

[#11899] CMSMS Linker function not working

avatar
Created By: Charles Butcher (chazzo)
Date Submitted: Tue Sep 18 07:03:04 -0400 2018

Assigned To:
Version: None
CMSMS Version: 2.2.10
Severity: Major
Resolution: Awaiting Response
State: Open
Summary:
CMSMS Linker function not working
Detailed Description:
It seems to me that the cmsms_linker function isn't working properly, so I can't
use it to insert links to content pages.

Clicking the toolbar button brings up the "Link to content page" dialog
correctly. However, typing in the "Enter Page title" box no longer triggers the
dropdown menu. In the past I have found the dropdown a bit slow to respond, but
now it doesn't work at all.

This is with TinyMCE 3.2b6 and CMSms 2.2.8. I've tried different users,
different TinyMCE profiles and different browsers, but I get the same result.

The only thing I know that's changed recently is that I've added a rule to
.htaccess to rewrite http as https. If that could have caused the problem,
sincere apologies for reporting this as a possible bug. In that case I would
really appreciate advice, though.


History

Comments
avatar
Date: 2018-09-18 07:52
Posted By: Mathieu Muths (airelibre) (airelibre)

Hello,

just tested on a HTTPS host with the same versions, and it seems to work
properly.

Can you test with and without your htaccess rule?

Thanks
      
avatar
Date: 2018-09-18 08:58
Posted By: Charles Butcher (chazzo)

Thanks Mathieu. Disabling the https rule does not help.

I noticed I have the same problem in MicroTiny.

/MicroTiny/lib/js/tinymce/plugins/cmsms_linker/plugin.js seems to be identical
to the equivalent file in TinyMCE, so I'm not sure if that tells us anything
useful.

AFAIK everything else in the backend, including all the other functions of
TinyMCE, are working.
      
avatar
Date: 2018-09-19 08:55
Posted By: Charles Butcher (chazzo)

The backend of the site is showing a few other minor strange behaviours. e.g. I
can no longer upload documents via the main File Manager dialog. So I think
something in the server configuration must have changed recently. Suggestions
are always welcome, but my working assumption at the moment is that this is not
a bug in TinyMCE.
      
avatar
Date: 2019-03-24 16:31
Posted By: Charles Butcher (chazzo)

The problem of the "Link to content page" button not working is back. This time
I'm on a different server with a clean install of CMSMS 2.2.10.

Importantly, it works in "Extensions > TinyMCE WYSIYWYG Editor" (the sandbox).
And it works in MicroTiny.

But if I try it with TinyMCE on a real page or news item, it fails. The "Link to
Content Page" popup appears, but typing in the "Link to page title" field does
not generate the dropdown file picker. From this point on, any attempt to save
or cancel dumps me back at the login screen.

It mangles the next login, too. The first login attempt produces a screen of
page aliases and its URL includes "ajax_getpages". I'm guessing this is from
class.tinymce_profile.php and is the list of choices that should have been
displayed by the file picker.

Adding a {cms_selflink} tag manually via the "view source" button in TinyMCE
also crashes the page. Without a WYSIWYG editor it works fine. Once successfully
inserted, the actual {cms_selflink} tags work as expected.

Changing user does not help. Nor does disabling all the security stuff in
.htaccess (such as the redirect that breaks the file manager).
      
avatar
Date: 2019-03-25 03:35
Posted By: Mathieu Muths (airelibre) (airelibre)

Anything in the server error log?
Thanks
      
avatar
Date: 2019-03-25 07:34
Posted By: Charles Butcher (chazzo)

Thanks Mathieu! I really appreciate your help.

I've looked at the access logs for yesterday, searching for 403 and 404 errors
associated with my IP address. Basically there were none.

There are about 1600 lines containing "TinyMCE". All looks good.

The hosting company's "error log" contains very little, and none of it relevant.
If there are any other logs, I don't have access to them.

Suggestions welcome.
      
avatar
Date: 2019-03-25 10:17
Posted By: Charles Butcher (chazzo)

Clearing the browser cache and cookies feed this. Many apologies.

I don't know why this should be a recurring issue for me, so perhaps there
really is an underlying issue of some kind. But at least it seems I have a
simple fix.
      
avatar
Date: 2019-03-25 11:10
Posted By: Charles Butcher (chazzo)

OK, this seems to be repeatable. If I don't clear cookies before starting a
backend session, the {cms_selflink} button forces a logout. When I clear cookies
it works as expected. Tested in Mac Safari and Firefox, with two different CMSms
users.

I normally have Google Analytics and "cookie permissions" cookies set, so I
disabled those. Same result, so the problem seems to relate only on the CMSms
session cookies.
      
avatar
Date: 2019-03-25 11:16
Posted By: Charles Butcher (chazzo)

Might be related to:

https://forum.cmsmadesimple.org/viewtopic.php?f=8&t=79398&hilit=cookies&start=15

and so a more general bug.
      
avatar
Date: 2019-03-26 12:41
Posted By: Charles Butcher (chazzo)

Yes, this is caused by the way CMSMS handles session cookies with https, at
least on some servers. See the link above.

This is obviously not a TinyMCE bug as such. However, it's interesting that I
have seen issues only with {cms_selflink} in TinyMCE.

Apologies for claiming that the problem persists when the .htaccess rewrite rule
(http > https) is disabled. It doesn't – as long as you then remember to log in
via http. Doh…
      
avatar
Date: 2019-09-03 06:18
Posted By: Mathieu Muths (airelibre) (airelibre)

Is that problem remaining in TinyMCE 3.3 ?
      
avatar
Date: 2019-09-03 09:41
Posted By: Charles Butcher (chazzo)

I'm afraid it is. Thank you for the new version, for which I claim the first
public download. I like the new icons. I upgraded to CMSMS 2.2.11 and tried
again, but get the same result. If I clear all session cookies before logging
in, everything is fine. If not, I get a trip to the login screen.
      
avatar
Date: 2020-06-02 18:23
Posted By: Morten Poulsen (silmarillion)

Fixed in latest version!
      
avatar
Date: 2020-06-03 05:20
Posted By: Charles Butcher (chazzo)

Many thanks. This seems to be fine with CMSMS 2.2.14 and TinyMCE 3.3.2.
      
Updates

Updated: 2019-03-24 16:32
severity_id: 3 => 2
cmsms_version_id: 31396 => 31482

Updated: 2018-09-18 07:52
resolution_id: => 10