I'm just lazy to do the pull request at the moment (and it's 3am). I'll do it in the morning if you prefer. Otherwise the code is below (it's just relocating three lines of code down a few lines).
In core/packages/formtools/richtext.cfc the output of #configJS# should be last. Currently it is being loaded *before* FarCry's overrides. Instead we should be allowed to override even FarCry's overrides. I spent a couple hours trying to figure out why my custom content_css wasn't loading (yeah, I'm an idiot. A simple "view html source" finally clued me in that it was in fact loading, but then FarCry was overriding it with it's own css file). You can either swap it yourself or use the code block below (I provided the entire <script></script> block for easier reference). If you move the #configJS# variable yourself (with it's conditional block), just keep in mind that the comma switches to the front of the variable.
<script language="javascript" type="text/javascript">
$j(function() {
tinymce.init({
selector: '###arguments.fieldname#',
script_url : '#application.url.webtop#/thirdparty/tiny_mce/tinymce.min.js',
farcryrelatedtypes: #serializeJSON(aRelatedTypes)#,
optionsURL: "#getAjaxURL(typename=arguments.typename,stObject=arguments.stObject,stMetadata=arguments.stMetadata,fieldname=arguments.fieldname,combined=false)#&action=templateoptions",
previewURL: "#getAjaxURL(typename=arguments.typename,stObject=arguments.stObject,stMetadata=arguments.stMetadata,fieldname=arguments.fieldname,combined=false)#&action=templatehtml",
image_list : "#getAjaxURL(typename=arguments.typename,stObject=arguments.stObject,stMetadata=arguments.stMetadata,fieldname=arguments.fieldname,combined=false)#&action=imageoptions&relatedTypename=#arguments.stMetadata.ftImageListFilterTypename#&relatedProperty=#arguments.stMetadata.ftImageListFilterProperty#",
link_list : "#getAjaxURL(typename=arguments.typename,stObject=arguments.stObject,stMetadata=arguments.stMetadata,fieldname=arguments.fieldname,combined=false)#&action=linkoptions&relatedTypename=#arguments.stMetadata.ftLinkListFilterTypenames#"
<cfif len(imageUploadField)>
, imageUploadField : #serializeJSON(imageUploadField)#
, imageUploadType : #serializeJSON(arguments.stMetadata.ftImageListFilterTypename)#
</cfif>
<cfif len(arguments.stMetadata.ftWidth)>
,width : "#arguments.stMetadata.ftWidth#"
</cfif>
<cfif len(arguments.stMetadata.ftHeight)>
,height : "#arguments.stMetadata.ftHeight#"
</cfif>
<cfif len(arguments.stMetadata.ftContentCSS)>
,content_css : "#arguments.stMetadata.ftContentCSS#"
</cfif>
<cfif len(configJS)>
,#configJS#
</cfif>
});
});
</script>
Jeff
On Apr 5, 2014, at 2:58 AM, Justin Carter <justin.w.carter-***@public.gmane.org> wrote:
> Yeah which ever is easiest for you, I don't mind copy and pasting or accepting a pull request :)
>
> On 05/04/2014 5:45 PM, "Jeff Coughlin" <jeff-***@public.gmane.org> wrote:
> I'll have to wait until it happens again. It can sometimes go a hundred saves without a problem. I'll let you know.
>
> btw, can I just mention a bug fix here for a TinyMCE fix (unrelated), or should I submit a pull request? It's just moving three lines of code down a few lines (it's in the wrong spot).
>
> Jeff
>
> On Apr 5, 2014, at 2:42 AM, Justin Carter <justin.w.carter-***@public.gmane.org> wrote:
>
>> Can you give me the stack trace or a log entry so that I can see where the crash is happening?
>>
>> On 05/04/2014 4:13 PM, "Jeff Coughlin" <jeff-***@public.gmane.org> wrote:
>> Every now and then when I edit the TinyMCE config I get the following error:
>> WDDX packet parse error at line 1, column 1.
>>
>> The problem is that once that error appears, the entire website crashes with that error (no website, no webtop). UpdateApp doesn't help either. The only solution so far that seems to resolve the problem is a CF restart (so something is cached that updateapp isn't catching... not sure what though).
>>
>> Thoughts?
>>
>> Jeff
>>
>>
>> On Apr 2, 2014, at 3:43 PM, Justin Carter <justin.w.carter-***@public.gmane.org> wrote:
>>
>>> There may have been a check for isJSON which failed and so it assumed the value was WDDX, but yours may have actually been corrupted JSON. I can add better error handling for this so that it doesn't crash even if both were "invalid". Hopefully on a clean upgrade (since yesterday's fix) it would happen though.
>>>
>>> Cheers,
>>> Justin
>>>
>>> On 03/04/2014 12:54 AM, "Jeff Coughlin" <jeff-***@public.gmane.org> wrote:
>>> It looks like that fixed it. Wow, that sucks to have to jump through those hoops (yay cf10). I noticed the code only looks at cf10 specifically though. Just out of curiosity, do you know if it is not an issue in cf11 beta?
>>>
>>> FYI: The fix worked, but only after restarting CF10. updateapp and updateall just caused the entire site to crash with the following error: WDDX packet parse error at line 1, column 1. Content is not allowed in prolog.., but a cf restart fixed it, so something else must have been cached that updateapp wouldn't correct. Hopefully no one is patching that on a shared host running cf10.
>>>
>>> Thanks for the fix.
>>>
>>> Jeff
>>>
>>> On Apr 2, 2014, at 1:41 AM, Justin Carter <justin.w.carter-***@public.gmane.org> wrote:
>>>
>>>> I think your issues with saving the TinyMCE config on CF10 should be resolved, I just posted a follow up in this thread:
>>>> https://groups.google.com/forum/#!category-topic/farcry-dev/nN479viFCXI
>>>>
>>>> Let me know how you go.
>>>>
>>>> cheers,
>>>> Justin
>>>>
>>>>
>>>> On Tuesday, April 1, 2014 3:25:53 PM UTC+11, Mark Picker wrote:
>>>> Up until just now I was running the standard config from core. However I'm now testing the below as it seems to be a good compromise (and it also won't save if I try to edit it a second time in the webtop).
>>>>
>>>>
>>>> Two differences from standard are:
>>>>
>>>>
>>>> forced_root_block : false <----- was 'p'
>>>>
>>>> force_p_newlines : true <----- New entry
>>>>
>>>>
>>>> Full config:
>>>>
>>>>
>>>> plugins : "farcrycontenttemplates,layer,table,hr,image_farcry,link_farcry,insertdatetime,media,searchreplace,contextmenu,paste,directionality,fullscreen,noneditable,visualchars,nonbreaking,anchor,charmap,code,textcolor",
>>>>
>>>> extended_valid_elements: "code,colgroup,col,thead,tfoot,tbody,abbr,blockquote,cite,button,textarea[name|class|cols|rows],script[type],img[style|class|src|border=0|alt|title|hspace|vspace|width|height|align|onmouseover|onmouseout|name]",
>>>>
>>>> menubar : false,
>>>>
>>>> toolbar : "undo redo | cut copy paste pastetext | styleselect | bold italic underline | bullist numlist link image table farcryuploadcontent farcrycontenttemplates | code | fullscreen",
>>>>
>>>> remove_linebreaks : false,
>>>>
>>>> forced_root_block : false,
>>>>
>>>> force_p_newlines : true,
>>>>
>>>> relative_urls : false,
>>>>
>>>> entity_encoding : 'raw'
>>>>
>>>>
>>>> Cheers
>>>>
>>>> Mark
>>>>
>>>>
>>>> From: farcr...-/***@public.gmane.org [mailto:farcr...-/***@public.gmane.org] On Behalf Of Justin Carter
>>>> Sent: Tuesday, 1 April 2014 3:21 PM
>>>> To: farcr...-/***@public.gmane.org
>>>> Subject: Re: [farcry-dev] Re: FarCry 7 bugs
>>>>
>>>>
>>>> Ok cool, I'll just make sure mine is running the same patch level locally...
>>>>
>>>>
>>>> Can you paste the config that you are using so that I can test the exact same thing?
>>>>
>>>>
>>>> cheers,
>>>> Justin
>>>>
>>>>
>>>> **********************************************************************
>>>> This message is intended for the addressee named and may contain
>>>> privileged information or confidential information or both. If you
>>>> are not the intended recipient please delete it and notify the sender.
>>>> **********************************************************************
>>>>
>>>>
>>>> --
>>>> You received this message cos you are subscribed to "farcry-dev" Google group.
>>>> To post, email: farcry-dev-/***@public.gmane.org
>>>> To unsubscribe, email: farcry-dev+unsubscribe-/***@public.gmane.org
>>>> For more options: http://groups.google.com/group/farcry-dev
>>>> --------------------------------
>>>> Follow us on Twitter: http://twitter.com/farcry
>>>> ---
>>>> You received this message because you are subscribed to the Google Groups "farcry-dev" group.
>>>> To unsubscribe from this group and stop receiving emails from it, send an email to farcry-dev+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/***@public.gmane.org
>>>> For more options, visit https://groups.google.com/d/optout.
>>>
>>>
>>> --
>>> You received this message cos you are subscribed to "farcry-dev" Google group.
>>> To post, email: farcry-dev-/***@public.gmane.org
>>> To unsubscribe, email: farcry-dev+unsubscribe-/***@public.gmane.org
>>> For more options: http://groups.google.com/group/farcry-dev
>>> --------------------------------
>>> Follow us on Twitter: http://twitter.com/farcry
>>> ---
>>> You received this message because you are subscribed to the Google Groups "farcry-dev" group.
>>> To unsubscribe from this group and stop receiving emails from it, send an email to farcry-dev+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/***@public.gmane.org
>>> For more options, visit https://groups.google.com/d/optout.
>>>
>>> --
>>> You received this message cos you are subscribed to "farcry-dev" Google group.
>>> To post, email: farcry-dev-/***@public.gmane.org
>>> To unsubscribe, email: farcry-dev+unsubscribe-/***@public.gmane.org
>>> For more options: http://groups.google.com/group/farcry-dev
>>> --------------------------------
>>> Follow us on Twitter: http://twitter.com/farcry
>>> ---
>>> You received this message because you are subscribed to the Google Groups "farcry-dev" group.
>>> To unsubscribe from this group and stop receiving emails from it, send an email to farcry-dev+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/***@public.gmane.org
>>> For more options, visit https://groups.google.com/d/optout.
>>
>>
>> --
>> You received this message cos you are subscribed to "farcry-dev" Google group.
>> To post, email: farcry-dev-/***@public.gmane.org
>> To unsubscribe, email: farcry-dev+unsubscribe-/***@public.gmane.org
>> For more options: http://groups.google.com/group/farcry-dev
>> --------------------------------
>> Follow us on Twitter: http://twitter.com/farcry
>> ---
>> You received this message because you are subscribed to the Google Groups "farcry-dev" group.
>> To unsubscribe from this group and stop receiving emails from it, send an email to farcry-dev+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/***@public.gmane.org
>> For more options, visit https://groups.google.com/d/optout.
>>
>> --
>> You received this message cos you are subscribed to "farcry-dev" Google group.
>> To post, email: farcry-dev-/***@public.gmane.org
>> To unsubscribe, email: farcry-dev+unsubscribe-/***@public.gmane.org
>> For more options: http://groups.google.com/group/farcry-dev
>> --------------------------------
>> Follow us on Twitter: http://twitter.com/farcry
>> ---
>> You received this message because you are subscribed to the Google Groups "farcry-dev" group.
>> To unsubscribe from this group and stop receiving emails from it, send an email to farcry-dev+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/***@public.gmane.org
>> For more options, visit https://groups.google.com/d/optout.
>
>
> --
> You received this message cos you are subscribed to "farcry-dev" Google group.
> To post, email: farcry-dev-/***@public.gmane.org
> To unsubscribe, email: farcry-dev+unsubscribe-/***@public.gmane.org
> For more options: http://groups.google.com/group/farcry-dev
> --------------------------------
> Follow us on Twitter: http://twitter.com/farcry
> ---
> You received this message because you are subscribed to the Google Groups "farcry-dev" group.
> To unsubscribe from this group and stop receiving emails from it, send an email to farcry-dev+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/***@public.gmane.org
> For more options, visit https://groups.google.com/d/optout.
>
> --
> You received this message cos you are subscribed to "farcry-dev" Google group.
> To post, email: farcry-dev-/***@public.gmane.org
> To unsubscribe, email: farcry-dev+unsubscribe-/***@public.gmane.org
> For more options: http://groups.google.com/group/farcry-dev
> --------------------------------
> Follow us on Twitter: http://twitter.com/farcry
> ---
> You received this message because you are subscribed to the Google Groups "farcry-dev" group.
> To unsubscribe from this group and stop receiving emails from it, send an email to farcry-dev+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/***@public.gmane.org
> For more options, visit https://groups.google.com/d/optout.
--
You received this message cos you are subscribed to "farcry-dev" Google group.
To post, email: farcry-dev-/***@public.gmane.org
To unsubscribe, email: farcry-dev+unsubscribe-/***@public.gmane.org
For more options: http://groups.google.com/group/farcry-dev
--------------------------------
Follow us on Twitter: http://twitter.com/farcry
---
You received this message because you are subscribed to the Google Groups "farcry-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email to farcry-dev+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/***@public.gmane.org
For more options, visit https://groups.google.com/d/optout.