We use cookies to improve your experience. No personal information is gathered and we don't serve ads. Cookies Policy.

ExpressionEngine Logo ExpressionEngine
Features Pricing Support Find A Developer
Partners Upgrades
Blog Add-Ons Learn
Docs Forums University
Log In or Sign Up
Log In Sign Up
ExpressionEngine Logo
Features Pro new Support Find A Developer
Partners Upgrades
Blog Add-Ons Learn
Docs Forums University Blog
  • Home
  • Forums

LG TinyMCE doesn't work w/ MSM

Development and Programming

sigork's avatar
sigork
155 posts
16 years ago
sigork's avatar sigork

1) LG TinyMCE (v.1.3.3) :: Enable

Notice: unserialize() [function.unserialize]: Error at offset 45808 of 65535 bytes in /usr/home/***/system/extensions/ext.lg_tinymce.php on line 1097 Notice: unserialize() [function.unserialize]: Error at offset 45808 of 65535 bytes in /usr/home/***/system/fiery_tea/core/core.ft_extensions.php on line 169

2) LG TinyMCE (v.1.3.3) :: Settings

Notice: unserialize() [function.unserialize]: Error at offset 45808 of 65535 bytes in /usr/home/***/system/fiery_tea/cp/cp.ft_addons.php on line 830 Notice: unserialize() [function.unserialize]: Error at offset 45808 of 65535 bytes in /usr/home/***/system/extensions/ext.lg_tinymce.php on line 1097 Notice: Undefined index: script_path in /usr/home/***/system/extensions/ext.lg_tinymce.php on line 194 Notice: Undefined index: script_config in /usr/home/***/system/extensions/ext.lg_tinymce.php on line 204 Notice: Undefined index: enable_gzip in /usr/home/***/system/extensions/ext.lg_tinymce.php on line 231 Notice: Undefined index: enable_gzip in /usr/home/***/system/extensions/ext.lg_tinymce.php on line 232 Notice: Undefined index: gzip_script_path in /usr/home/***/system/extensions/ext.lg_tinymce.php on line 243 Notice: Undefined index: gzip_script_config in /usr/home/***/system/extensions/ext.lg_tinymce.php on line 253 Notice: Undefined index: check_for_updates in /usr/home/***/system/extensions/ext.lg_tinymce.php on line 280 Notice: Undefined index: check_for_updates in /usr/home/***/system/extensions/ext.lg_tinymce.php on line 281 Notice: unserialize() [function.unserialize]: Error at offset 45808 of 65535 bytes in /usr/home/***/system/fiery_tea/core/core.ft_extensions.php on line 169

3) TinyMCE Script Path :: /tiny_mce/tiny_mce.js GZip Script Path :: /tiny_mce/tiny_mce_gzip.js

Notice: unserialize() [function.unserialize]: Error at offset 45808 of 65535 bytes in /usr/home/***/system/extensions/ext.lg_tinymce.php on line 1097 Notice: unserialize() [function.unserialize]: Error at offset 45808 of 65535 bytes in /usr/home/***/system/extensions/ext.lg_tinymce.php on line 1097 Warning: Cannot modify header information - headers already sent by (output started at /usr/home/***/system/extensions/ext.lg_tinymce.php:1097) in /usr/home/***/system/core/core.functions.php on line 296

Latest Versions.

       
AJP's avatar
AJP
311 posts
16 years ago
AJP's avatar AJP

If you’re running into this error, I’ve found it best to remove the extended settings from the extension file, as I think I had memory allocation problems installing it on sites a few times. That took care of the problem.

Also note, with MSM, you’ll need to install the settings for each individual site. And make sure you create your sites before you enable TinyMCE, otherwise, you have to go and re save the settings in TinyMCE.

       
sigork's avatar
sigork
155 posts
16 years ago
sigork's avatar sigork

I installed Settings for all 3 Sites (MSM).

1) Now CP shows more Notices than before. Each CP page shows:

Notice: unserialize() [function.unserialize]: Error at offset 45559 of 65535 bytes in /usr/home/***/system/fiery_tea/core/core.ft_extensions.php on line 169 Notice: unserialize() [function.unserialize]: Error at offset 45559 of 65535 bytes in /usr/home/***/system/extensions/ext.lg_tinymce.php on line 1097

2) EE regularly deletes LG TinyMCE Settings. And I see that is a usual problem here:

LG TinyMCE doesn’t save settings

       
AJP's avatar
AJP
311 posts
16 years ago
AJP's avatar AJP

Try disabling and re-enabling the extension. You’re getting and error from Fiery Tea extensions too. I’ve never had problems with EE removing settings. But I’d try re-installing the extension. Yes you’ll have to redo settings per site.

Uninstall the extension, edit the ext.lg_tinymce.php file and remove the LARGE BLOCK of advanced settings from the code. Re-upload, and re-enable the extension.

That did it for me when I got that error.

       
paul1111's avatar
paul1111
25 posts
16 years ago
paul1111's avatar paul1111

I know this is an old thread, but Im having the exact same problem. I created a new site with MSM, went to the extension settings, didn’t even change anything, hit save, and it stopped working. I can’t fix it. I have tried disabling the extension, reinstalling the extension, it just doesn’t work.

AJP, You say there is some kind of large block of advanced settings, but I don’t know what you mean. Can you be more specific? Also does this mean that I can only use the basic features of tinyMCE from now on if I’m using MSM?

       
sigork's avatar
sigork
155 posts
16 years ago
sigork's avatar sigork

1) Find ext.lg_tinymce.php in your system/extensions/

2) Find the code

debug : false",
    'script_config'                    => "// General
...
...
    +'|onkeyup|onmousedown|onmousemove|onmouseout|onmouseover|onmouseup|style'"
);
        return $default_settings;

and delete everything between the double quotes.

The result should be:

debug : false",
    'script_config'                    => ""
);
        return $default_settings;

That solved problems with Notices and Warnings. But as before, the extension does not work in my case.

       
AJP's avatar
AJP
311 posts
16 years ago
AJP's avatar AJP

No, Leevi has a large block of settings that he uploads by default into the file. You can add whichever settings you like into TinyMCE. If you edit the ext.lg_tinymce.php file, you can remove everything from line 463 to 749. Make sure you leave an ending double-quote.

I’ve had this solution work when I had this type of “offset” error. YMMV.

       
paul1111's avatar
paul1111
25 posts
16 years ago
paul1111's avatar paul1111

@AJP Thank you, disabling, deleting those lines, then re-enabling got it all working again.

       
Andrew Gunstone's avatar
Andrew Gunstone
101 posts
16 years ago
Andrew Gunstone's avatar Andrew Gunstone

Hi all… I see this discussion happening quite a bit in the forum… so I thought I would throw my two cents in!

Basically the configuration settings are being saved in a single field in the “exp_extensions” table in the database. This single field is a “text” field. MySQL Text fields have a maximum length (ie. number of characters) of 65535.

The default settings for TinyMCE that Leevi has included with the extension (that really big block of text as described above) runs at about 22000 characters (give or take).

Now… obviously if you use this with MSM, you have to times this 22000 characters by the number of sites you have! The extension will work fabulously well for 1 or even 2 sites, but once you hit 3 or more, you will find that the “offset” error will occur.

There are three ways to fix this issue:

  1. Delete a chunk of the settings as described above.
  2. Change the “settings” field in the “exp_extensions” table from “text” to either “mediumtext” or “longtext” ***** note that this is not recommended, and if you do this you should make plenty of backups of your database!!
  3. Petition Leevi Graham to update the extension so that the settings for this extension are held in their own database table (sorry Leevi!!).

Cheers.

       
Jonathan Schofield's avatar
Jonathan Schofield
175 posts
15 years ago
Jonathan Schofield's avatar Jonathan Schofield

I’ve run into this issue as well!

Agun, thanks so much for that point of clarity on field character limit, and thanks AJP for helping me see which fat could be trimmed.

I’ve not delved into the inner workings of TimyMCE in great detail but I’m guessing that the section on valid elements is an important control for preventing malformed/invalid XHTML?

So I had a look at the TinyMCE docs on valid elements and noticed that they have a default rule set for which they say

“it is recommended that you stick with the default rule set, because it should be sufficient for most people”

But Leevi is using the full XHTML rule set.

Having stripped out the entities config (I’m using charset=utf-8 anyway) and replaced the full XHTML rule set with the default rule set, I still have a saving of 17,361 characters, and now have 4 MSM sites using LG TimyMCE happily with plenty of space for more.

Here’s my replacement for lines 464 to 749 inclusive…

entities : '',

// XHTML validation
valid_elements : '@[id|class|style|title|dir<ltr?rtl|lang|xml::lang|onclick|ondblclick|'
+ 'onmousedown|onmouseup|onmouseover|onmousemove|onmouseout|onkeypress|'
+ 'onkeydown|onkeyup],a[rel|rev|charset|hreflang|tabindex|accesskey|type|'
+ 'name|href|target|title|class|onfocus|onblur],strong/b,em/i,strike,u,'
+ '#p,-ol[type|compact],-ul[type|compact],-li,br,img[longdesc|usemap|'
+ 'src|border|alt=|title|hspace|vspace|width|height|align],-sub,-sup,'
+ '-blockquote,-table[border=0|cellspacing|cellpadding|width|frame|rules|'
+ 'height|align|summary|bgcolor|background|bordercolor],-tr[rowspan|width|'
+ 'height|align|valign|bgcolor|background|bordercolor],tbody,thead,tfoot,'
+ '#td[colspan|rowspan|width|height|align|valign|bgcolor|background|bordercolor'
+ '|scope],#th[colspan|rowspan|width|height|align|valign|scope],caption,-div,'
+ '-span,-code,-pre,address,-h1,-h2,-h3,-h4,-h5,-h6,hr[size|noshade],-font[face'
+ '|size|color],dd,dl,dt,cite,abbr,acronym,del[datetime|cite],ins[datetime|cite],'
+ 'object[classid|width|height|codebase|*],param[name|value|_value],embed[type|width'
+ '|height|src|*],script[src|type],map[name],area[shape|coords|href|alt|target],bdo,'
+ 'button,col[align|char|charoff|span|valign|width],colgroup[align|char|charoff|span|'
+ 'valign|width],dfn,fieldset,form[action|accept|accept-charset|enctype|method],'
+ 'input[accept|alt|checked|disabled|maxlength|name|readonly|size|src|type|value],'
+ 'kbd,label[for],legend,noscript,optgroup[label|disabled],option[disabled|label|selected|value],'
+ 'q<cite>,samp,select[disabled|multiple|name|size],small,'
+ 'textarea[cols|rows|disabled|name|readonly],tt,var,big'"

Leevi, any chance of a separate table for these settings for your otherwise fantastic extension?!

       
Wil Linssen's avatar
Wil Linssen
49 posts
15 years ago
Wil Linssen's avatar Wil Linssen

I’ve recently run into something similar with multiple sites. What was happening for me was that the MYSQL TEXT column type just wasn’t long enough to store the settings for all the multiple sites, and it was truncating them and breaking everything.

To fix it, I just changed the column type to LONGTEXT. Job done.

       

Reply

Sign In To Reply

ExpressionEngine Home Features Pro Contact Version Support
Learn Docs University Forums
Resources Support Add-Ons Partners Blog
Privacy Terms Trademark Use License

Packet Tide owns and develops ExpressionEngine. © Packet Tide, All Rights Reserved.