Hi Kevin, thanks for your excellent module. I found bug with TinyMCE. I think tinyMCE module incompatible with i18n module. I use tinymce module and i18n in my site, but tinymce doesn't work. I trace tinymce code and found that tinymce module check aliased URL only, not the normal path. So, I made a few changes. Just take a look at this in 'tinymce.module' file
function _tinymce_page_match($edit) {
.......
if ($edit->settings['access'] < 2) {
$path = drupal_get_path_alias($_GET['q']);
$normal_path = drupal_get_normal_path($path); // I ADDED THIS LINE
$regexp = '/^('. preg_replace(array('/(\r\n?|\n)/', '/\\\\\*/', '/(^|\|)\\\\($|\|)/'), array('|', '.*', '\1'. preg_quote(variable_get('site_frontpage', 'node'), '/') .'\2'), preg_quote($edit->settings['access_pages'], '/')) .')$/';
$page_match = !($edit->settings['access'] xor (preg_match($regexp, $path) or preg_match($regexp, $normal_path))); // AND CHANGE THIS LINE
.........
}
Regards,
Manda - Indonesia
my_beatman@yahoo.com
| Comment | File | Size | Author |
|---|---|---|---|
| #1 | tinymce.module.patch | 960 bytes | seanr |
Comments
Comment #1
seanrWith the context UI module enabled, I see this bug as well. The attached patch fixes it and is a bit more streamlined than the above.
Comment #2
Scott.Champion commentedI found this problem too. In the current version of TinyMCE (5.x-1.9) I find that some pages aren't chosen to have the editor on them because of their URL as appears in the browser box. Usually, in drupal modules where you select the pages to be chosen, it uses the original urls before they are aliased. You can do this with arg(0). Just ran into it and it wasn't behaving the way I expected.
Is this a feature to let people have more control? Or does it add unnecessary complexity and divergence from standards?
Comment #3
sylvaingirard commentedNoticed the same problem, patch is tested and found to be OK.
Comment #4
pomliane commentedThis version of TinyMCE is not supported anymore. The issue is closed for this reason.
Please upgrade to a supported version and feel free to reopen the issue on the new version if applicable.
This issue has been automagically closed by a script.