Ok, so I’ve got this bit of weirdness going on in my EE CP. I started off, using Brandon Kellys Fieldframe extension, and some of the standard fieldtypes that it comes with. For my WYSIWYG functionality I decided to give Leevi Grahams LG TinyMCE 2.0 a whirl, which is a fieldtype for fieldframe.
After a couple of days using it it was giving me random blank CP screens, which I assume were PHP errors. I didn’t have error reporting turned on, but did some testing around and came to the conclusion that it was that fieldtype that was giving me the blank CP screens. So, I removed the LG TinyMCE 2.0 fieldtype and decided to just go with the LG TinyMCE 1.3.3 extension.
Now however when I go to my field group, for some fields under field type, for some reason the extension is adding the word “WYSIWYG” to my other field types that aren’t WYSIWYG fields. I have attached a screenshot so you can see what I mean.
Everything seems to be working fine however with my EE install, everything is behaving as expected, however this is just one little thing that will drive me nuts until I figure out a way to fix it. Part of me wants to re-install EE and start from scratch, but I was hoping that someone here would have some insight into why this is being caused, and even better, how I can fix it without having to go back and re-do all the EE setup.
Any hints, suggestions, etc would be greatly appreciated, thanks 😊
I think I might just create a new field group with all of the same fields, and delete the old field group as it doesn’t seem to be happening on the new field group. Oh well, don’t have to start over at the beginning, but it will take a bit of time to copy/paste all of the current content into the new fields.
Took me a while to find the FieldFrame version of LG TinyMCE. Its over at github if anyone is looking for it. Not sure why Leevi doesn’t link to it anywhere.. are there bugs I should be looking out for?
Took me a while to find the FieldFrame version of LG TinyMCE. Its over at github if anyone is looking for it. Not sure why Leevi doesn’t link to it anywhere.. are there bugs I should be looking out for?
Hey Luke,
I didn’t make the custom field public because there were still a few bugs with fieldframe at the time. We resolved all of the bugs today and pushed a new version of the field type to GitHub.
Download it and let me know what you think!
Probably should mention the new URL is https://github.com/newism/lg.tiny_mce.field_type.ee_addon.
Thanks for this Leevi. I use this extension (and now the fieldtype) a lot.
I have just squashed a bug / feature issue (depending on who you ask) relating to TinyMCE itself that has been harassing me on and off on a couple of EE installs for ages.
It seems some time in 2008 or 2009 TinyMCE stopped encoding single and double quotes by default. This is not a problem in EE when working with Textarea fields, but for some reason with LG TinyMCE fields, conditionals choke on unescaped strings. Stuff like this: {if lg_tinymce_field} or {if lg_tinymce_field != ''} leads to ‘unexpected string’ parse errors.
To try and fix this I added a callback to my LG TinyMCE config file like this:
save_callback : "fixQuotes",
Which calls this
// Tiny MCE fields do not contain escaped quotes any more.
// This is causing conditional problems.
function fixQuotes(element_id, html, body) {
html = html.replace(/(\>[^<]*?)'/g,'$1'');
html = html.replace(/(\>[^<]*?)"/g,'$1"');
html = html.replace(/"/g,'\"');
html = html.replace(/'/g,"\'");
return html;
}
}
Edit:Unfortunately the above solution doesn’t work either for some unknown reason - quotes remain unencoded. Now I’m back to sheer ugliness in my templates:
{if '{exp:replace find="QUOTE|'" replace="|" multiple="yes"}{location_tours}{/exp:replace}' != ''}
Leevi, do you have any idea how I can go about sorting this out?
Packet Tide owns and develops ExpressionEngine. © Packet Tide, All Rights Reserved.