FarCry 7 bugs

84 views
Skip to first unread message

Mark Picker

unread,
Mar 30, 2014, 11:43:05 PM3/30/14
to farcr...@googlegroups.com
Hi,
 
I'm having a play today with what would be involved in upgrading some of our sites to FarCry 7 and have noticed a few more bugs.  At the moment I'm still trying to work my way through ones that may be caused by code that has extended core but the following seem to be core bugs.
 
In IE10 and Chrome (both local site and your sample one on CloudBees.net) if you do the following:
 
Create a new HTML page
In the Body click "FarCry content templates" -> Image
Cancel the window that opens
Now click the built-in TinyMCE "Insert/edit" image button
Cancel the window that opens
Now try using the FarCry content templates again. None of them (Image, File etc.) do anything anymore.
 
Another bug that I've tried on both local and CloudBees revolves around IE10.
 
Similar to steps above, create new HTML page etc. but this time add an image via Associated Media and insert into the page.  In IE you can't resize the image. You can drag the handles around but nothing happens. If you edit the properties and put in different w x h it still doesn't show a resized image.
 
I'll leave the other possible bugs until I can confirm if a core problem or a project related problem.
 
Cheers
Mark

Justin Carter

unread,
Mar 31, 2014, 12:13:30 AM3/31/14
to farcr...@googlegroups.com
Hey Mark,

The FarCry Content Templates button seems to be broken the second time you use it, I get the following JS error:

TypeError: r is null
tinymce.min.js (line 7)

It's probably our plugin, I'll take a look when I get a chance.

Regarding image resizing in IE10, can you tell me if it works when you go to the official TinyMCE demo page and insert/resize an image?

Our version of TinyMCE 4.x is a little out of date now so we might just need to upgrade it.

cheers,
Justin

Mark Picker

unread,
Mar 31, 2014, 12:54:03 AM3/31/14
to farcr...@googlegroups.com
Hi Justin,
 
Just gave the image resize a try and yep, works well on the TinyMCE demo site.  Looks like core needs a refresh.
 
Glad that one is your problem :) Getting frustrated at the moment while working through a long list of bugs, trying to work out what is a FC bug and what is being caused by project code. Earlier I couldn't even get TinyMCE to display but found that we had a richtext.cfc in the Internet site project that was causing problems. Main issue is that I have no idea what half these extensions are doing as they were delivered with the site project.
 
I know the whole argument against documentation inside code but one or two lines to explain why something is being modified would help :)
 
So are we now at the stage where you would prefer bugs to be logged in JIRA, rather than raised on here?
 
Cheers
Mark

Mark Picker

unread,
Mar 31, 2014, 1:00:48 AM3/31/14
to farcr...@googlegroups.com
Regarding the JS error, yeah would have helped if I turned debugging back on :)
 
I now get a similar error on the same line as you:
 
SCRIPT5007: Unable to get property 'setAttribute' of undefined or null reference
tinymce.min.js, line 7 character 9482
 
Cheers
Mark

Justin Carter

unread,
Mar 31, 2014, 2:07:28 AM3/31/14
to farcr...@googlegroups.com
If you have a list of bugs then it doesn't hurt to paste it here and we can determine whether or not they require bug tickets to be raised. No point going to the hassle of logging a bug if it's not a bug :)

The TinyMCE configuration is a known upgrade issue but it's possible that it hasn't been mentioned on the list yet... Essentially, old configs could be trying to load "built-in" plugins that no longer exist or are no longer shipped with TinyMCE, and instead of TinyMCE handling missing plugins it just crashes. There's not too much that we can do about that one other than point out that anyone with an extended richtext.cfc with a custom configuration should check the list of plugins (or just remove the custom config and then re-customise it if need be). I've worked around the compatibility issue with the config-based custom TinyMCE configuration by using a new property name, so it should work out of the box in contrast to the extended richtext.cfc method.

cheers,
Justin



--
You received this message cos you are subscribed to "farcry-dev" Google group.
To post, email: farcr...@googlegroups.com
To unsubscribe, email: farcry-dev+...@googlegroups.com
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+...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Justin Carter

unread,
Mar 31, 2014, 7:26:06 PM3/31/14
to farcr...@googlegroups.com
I've upgraded to TinyMCE 4.0.20 in trunk and it looks like it should fix both of your issues. I can confirm that the FarCry Content Templates dialog issue is fixed, though I'm only guessing the IE10 image resizing issue should also be fixed (I didn't check the changelog specifically but I don't think there's anything that we could do to break that feature).

cheers,
Justin

Mark Picker

unread,
Mar 31, 2014, 8:18:40 PM3/31/14
to farcr...@googlegroups.com
Hi Justin,
 
I've applied the new code from Trunk and yes it has fixed the FarCry Content Templates problem, thank you.  However the issue with not being able to resize images is still there. I've checked that when using the TinyMCE demo site the document mode etc. is the same as when using FarCry. Also no errors in the console or problems with loading JS etc. files.
 
Cheers
Mark

Mark Picker

unread,
Mar 31, 2014, 8:50:04 PM3/31/14
to farcr...@googlegroups.com

Just to add another possible related issue, I'm unable to edit the TinyMCE settings in the webtop. Regardless of what I enter (even leaving the body blank) it always errors out with the below.


This is the same error regardless of what is entered:


JSON parsing failure: Expected ',' or '}' at character 174:'a' in {"ownedby":"","typename":"configTinyMCE","createdby":"","lastupdatedby":"","datetimecreated":"","lockedBy":"","datetimelastupdated":"","label":"","tinyMCE_config":"theme : "advanced", width: "100%", height: "400", plugins : "advhr,advlink,preview,zoom,searchreplace,print,contextmenu,paste,directionality,fullscreen", theme_advanced_buttons2_add : "separator,forecolor,backcolor", theme_advanced_buttons2_add_before: "cut,copy,paste,pastetext,pasteword,separator,search,replace,separator", theme_advanced_buttons3_add_before : "tablecontrols,separator", theme_advanced_buttons3_add : "advhr,separator,print,separator,ltr,rtl,separator", theme_advanced_toolbar_location : "top", theme_advanced_toolbar_align : "left", theme_advanced_path_location : "bottom", theme_advanced_disable : "hr", theme_advanced_resize_horizontal : false, theme_advanced_resizing : true, theme_advanced_styles : "style one=style_one;style two=style_two", content_css : "/css/main.css", inline_styles : true, relative_urls : false, ...
Cheers
Mark

Mark Picker

unread,
Mar 31, 2014, 10:58:57 PM3/31/14
to farcr...@googlegroups.com
I've just tested the image resize problem with IE11 and it does NOT have this problem.  However (more great news...) I've noticed that IE11 has another problem that Opera also has; when resizing the image it keeps adding extra <p></p> tags after the img tag. So you end up with something like:
 
<p>Testing image resize</p>
<p><img src="/images/dmImage/SourceImage/background%2Dmining%2Ejpg" border="0" width="537" height="359" /></p>
<p> </p>
<p> </p>
<p> </p>
<p> </p>
<p> </p>
 
Slight difference is that Opera sometimes doesn't put a space between the closing p tag.
 
I was assuming these were TinyMCE bugs, not FarCry however I don't experience the same issue when using the TinyMCE demo site.

Geoff Bowers

unread,
Mar 31, 2014, 11:07:45 PM3/31/14
to farcr...@googlegroups.com
They may still be tinyMCE bugs.  They possibly only manifest in the way we embed the editor.

I would note that contributors should avoid modifying the image width/height inline -- it leads to all sorts of badness :) I'd be keen to see how we could *block* image re-size options in the editor.

GB


--

Mark Picker

unread,
Mar 31, 2014, 11:10:13 PM3/31/14
to farcr...@googlegroups.com
"I'd be keen to see how we could *block* image re-size options in the editor"
 
--easy one. Have everyone use IE10 :)
 
But jokes aside, I have come across heaps of examples of ways to make TinyMCE block resizing of images.

Geoff Bowers

unread,
Mar 31, 2014, 11:11:55 PM3/31/14
to farcr...@googlegroups.com

On 1 April 2014 14:10, Mark Picker <mark....@det.nsw.edu.au> wrote:
But jokes aside, I have come across heaps of examples of ways to make TinyMCE block resizing of images.

Send through some links please! -- i'd seriously be keen to have inline image resizing blocked by default in the standard editor config.  Given you can cut/crop images to meet any nominated content strategy there should be no need to resize images appearing inline in body content.

GB

Mark Picker

unread,
Mar 31, 2014, 11:16:51 PM3/31/14
to farcr...@googlegroups.com

Mark Picker

unread,
Mar 31, 2014, 11:29:34 PM3/31/14
to farcr...@googlegroups.com
With regards to TinyMCE adding extra p tags after image resizing, if I change the following:

\packages\formtools\richtext.cfc

forced_root_block : 'p',

 to

forced_root_block : false,

The problem goes away, however what concerns me is this comment on the TinyMCE site:
"Note that not using P elements as root block can severly cripple the functionality of the editor."
(http://www.tinymce.com/wiki.php/Configuration:forced_root_block)
 
No mention of what impact it has, but it sounds like it should be enabled.

Justin Carter

unread,
Mar 31, 2014, 11:44:53 PM3/31/14
to farcr...@googlegroups.com
The additional <p> tags may have something to do with the forced_root_block : 'p' in the config, but it would appear to be a TinyMCE bug more than anything... This has been the default setting (even though we provide it explicitly) since TinyMCE 3, and is almost always the desired option:


(Hah, I wrote this straight after my last email and didn't hit send - just saw your reply now, but I'll hit send anyway! So yeah, definitely wouldn't want to set that value to false...)

Jeff Coughlin

unread,
Mar 31, 2014, 11:45:42 PM3/31/14
to farcr...@googlegroups.com
Mark,

The reason I added forced_root_block : 'p' to the default config years ago was because when all clients used the editor and typed in a single paragraph (without hitting enter), the result was text with "no" paragraph tag (very bad).

This may have changed since then (it was years ago), but still something to keep an eye out for and maybe test.

Jeff

Jeff Coughlin

unread,
Mar 31, 2014, 11:49:16 PM3/31/14
to farcr...@googlegroups.com
Yeah, when I added it to the default config in FC core it wasn't a default in TinyMCE.  Months later after many TinyMCE users complained about the issue, they just added it to the TinyMCE default.  I'm sure it can be removed as part of the FC default config now.

Jeff

Justin Carter

unread,
Mar 31, 2014, 11:50:39 PM3/31/14
to farcr...@googlegroups.com
Didn't realise my last email to Mark was accidentally a private reply, here it is for the record:

From: Justin Carter
Sent: Tuesday, 1 April 2014 2:31 PM
 
With a blank TinyMCE config and the "Enable Config" box checked it's working OK for me. I also pasted the config from the richtext.cfc into the box and it's working there as well.
 
Are you getting a problem saving the config, or opening it? It looks like an issue deserializing, which is odd because you'd expect CF's own deserialize method should be able to read something that it serialized in the first place...
 
Try resetting the config by checking TinyMCE Configuration and clicking the Delete / Reset button.
 
Also, could you post your config to the list so that I can test it?
 
Here's the one I'm using from core that works:
 
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 : 'p',
relative_urls : false,
entity_encoding : 'raw'
 
 
cheers,
Justin

---

Mark confirmed that deleting / resetting the config has fixed the issue with saving - I'm thinking perhaps it was an older copy of the config that included the TinyMCE 3 config that had been converted from WDDX to JSON and something went wrong in the process. As far as the code is concerned it's just serializing / deserializing a struct, so I'm not sure yet what could have caused that to fail.


cheers,
Justin

Jeff Coughlin

unread,
Mar 31, 2014, 11:58:28 PM3/31/14
to farcr...@googlegroups.com
Serialize and deserialize JSON in CF has gone through many patches since it was introduced. I remember the worst one was that integers were being saved as strings when it was first released and took a VERY long time before they released a patch for it (made it pretty useless in many scenarios... ugg).

Even in CF10 I think there was at least one bug fix for it. It may or not be related to your problem, but maybe compare CF versions. What version of CF were you using (including patch level)? Also, maybe take a look at the JSON string yourself line-by-line and see where the discrepancy is.

Jeff

Justin Carter

unread,
Apr 1, 2014, 12:11:06 AM4/1/14
to farcr...@googlegroups.com
I've tracked down the IE10 image resizing issue, it's the bootstrap-tinymce.css that is setting the image height and width to "auto", and since TinyMCE is using width and height attributes to do the resizing, the CSS is overriding it. If I disable those two CSS properties in IE dev tools it fixes the problem - I'll have a commit for this shortly. (Note that you may need to clear your browser cache to force a refresh, it's sometimes tricky to get assets in an iframe to be flushed).

cheers,
Justin

Mark Picker

unread,
Apr 1, 2014, 12:11:15 AM4/1/14
to farcr...@googlegroups.com
With regards to the TinyMCE config, after I deleted/reset the config it did now allow me to edit and save a config (and use it).  However, I've just noticed that if I open the configuration again and resave it, it fails again with the same error. I didn't make any changes when I opened it.  The only way to fix it is to delete the config and start again.

Picker, Mark

unread,
Apr 1, 2014, 12:13:14 AM4/1/14
to farcr...@googlegroups.com

Excellent! Thank you Justin.

 

It’s just a pity that while looking at this issue, I found other problems that have now created more work L


**********************************************************************
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.
**********************************************************************

Justin Carter

unread,
Apr 1, 2014, 12:15:55 AM4/1/14
to farcr...@googlegroups.com
Which version of CF are you running, including the update/hotfix version? 

It shouldn't be failing serializing/deserializing a string... :\

cheers,
Justin


Picker, Mark

unread,
Apr 1, 2014, 12:18:22 AM4/1/14
to farcr...@googlegroups.com

All the servers in this cluster are the same as below:

 

ColdFusion Version  10,0,11,285437 

Tomcat Version  7.0.23.0 

Standard Edition 

Update Level  /D:/ColdFusion10/cfusion/lib/updates/chf10000011.jar   

Adobe Driver Version  4.1 (Build 0001)

Justin Carter

unread,
Apr 1, 2014, 12:21:28 AM4/1/14
to farcr...@googlegroups.com
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?
--

Picker, Mark

unread,
Apr 1, 2014, 12:25:53 AM4/1/14
to farcr...@googlegroups.com

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...@googlegroups.com [mailto:farcr...@googlegroups.com] On Behalf Of Justin Carter
Sent: Tuesday, 1 April 2014 3:21 PM
To: farcr...@googlegroups.com
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

Picker, Mark

unread,
Apr 1, 2014, 1:52:18 AM4/1/14
to farcr...@googlegroups.com

Just grabbed latest code from GitHub and IE can now resize images again. Woohoo! Thanks Justin.

 

From: farcr...@googlegroups.com [mailto:farcr...@googlegroups.com] On Behalf Of Justin Carter
Sent: Tuesday, 1 April 2014 3:11 PM
To: farcr...@googlegroups.com
Subject: [farcry-dev] Re: FarCry 7 bugs

 

I've tracked down the IE10 image resizing issue, it's the bootstrap-tinymce.css that is setting the image height and width to "auto", and since TinyMCE is using width and height attributes to do the resizing, the CSS is overriding it. If I disable those two CSS properties in IE dev tools it fixes the problem - I'll have a commit for this shortly. (Note that you may need to clear your browser cache to force a refresh, it's sometimes tricky to get assets in an iframe to be flushed).

 

cheers,

Justin

.

Justin Carter

unread,
Apr 2, 2014, 1:41:14 AM4/2/14
to farcr...@googlegroups.com
I think your issues with saving the TinyMCE config on CF10 should be resolved, I just posted a follow up in this thread:

Let me know how you go.

cheers,
Justin

Jeff Coughlin

unread,
Apr 2, 2014, 9:54:26 AM4/2/14
to farcr...@googlegroups.com
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

Justin Carter

unread,
Apr 2, 2014, 3:43:15 PM4/2/14
to farcr...@googlegroups.com

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

Justin Carter

unread,
Apr 2, 2014, 4:12:59 PM4/2/14
to farcr...@googlegroups.com

Hmm, I just had a quick look at farConfig but both the appropriate checks are in place... I'll dig a bit further later on today.

Justin Carter

unread,
Apr 2, 2014, 11:17:42 PM4/2/14
to farcr...@googlegroups.com
BTW, nope I haven't tested CF11 Beta yet... If it's also a problem there (probably a good chance) then we'll need to update the version check - at least it's a trivial change though.

cheers,
Justin

Jeff Coughlin

unread,
Apr 5, 2014, 1:13:17 AM4/5/14
to farcr...@googlegroups.com
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       

Justin Carter

unread,
Apr 5, 2014, 2:42:50 AM4/5/14
to farcr...@googlegroups.com

Can you give me the stack trace or a log entry so that I can see where the crash is happening?

Jeff Coughlin

unread,
Apr 5, 2014, 2:44:57 AM4/5/14
to farcr...@googlegroups.com
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

Justin Carter

unread,
Apr 5, 2014, 2:58:22 AM4/5/14
to farcr...@googlegroups.com

Yeah which ever is easiest for you, I don't mind copy and pasting or accepting a pull request :)

Jeff Coughlin

unread,
Apr 5, 2014, 3:08:03 AM4/5/14
to farcr...@googlegroups.com
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

Justin Carter

unread,
Apr 6, 2014, 9:03:11 PM4/6/14
to farcr...@googlegroups.com
Hmmm, I don't think I can make this change right now...

For a global content_css value you can extend richtext.cfc and set a default value for the ftContentCSS attribute, and this will apply to all rich text areas (this is generally what you want). But you can also override ftContentCSS on individual formtool properties in your content types (same goes for width and height).

If I move the global configJS to the bottom, then it will break any formtool properties that have css/width/height specified individually (if they are also present in the global config). So any changes that you want to make "globally" for those 3 properties probably need to be done by extending richtext.cfc, rather than via the config.

To allow them to be defaulted in the config (rather than extending richtext.cfc), and also overridable in each formtool property, I think we'd need to do some smarter splitting/parsing of the JS config, or break those particular properties out into separate fields in the config (probably the better option).

cheers,
Justin

Jeff Coughlin

unread,
Apr 6, 2014, 11:48:02 PM4/6/14
to farcr...@googlegroups.com
Justin,

Hmm... well, it definitely breaks the way FarCry works.  But now that I think about it, I like that you can override it in the formtool property.  This will allow me to load different css files for different scenarios (like a different css file for the sidebar) - this is something I've wanted for a long time, but never thought of a good way to handle it.  So it's definitely a good thing.  The way it stands now, it might confuse some people to know that they can't load the custom css file(s) the way the RTE normally allows you to.

Here's a thought.  Maybe keep it the new way, but make a visible note about it in the TinyMCE config screen with a link to more info (docs) on how to use it.  Thoughts?

One other thing that can improve that process... I'd still like to be able to set a global one and a FarCry config value would work perfectly for that.  The default could be the one you're already using (and maybe set it to the ftHint in case people want to reset it), but allow people to override it.  Then they can still override for certain scenarios using the property tag for those areas where needed.  This way for the majority of cases (basically the body area of most pages and custom types), people won't have to set it to the same css file each and every time in the property tag - and more importantly they won't have to override dmHTML.cfc for every single project just to do the same thing as setting a global custom css in a FarCry config.  

Thoughts?

Jeff

btw, I've been doing quite a lot with the new TinyMCE 4 configs and there is quite a lot you can do with it for your FC projects.  It's very powerful (once you get past the poor/lacking documentation - I had to crawl through some of their js to find out a few things you can do).  Maybe someday soon I'll write up a good how-to in the FarCry docs for customizing the configs for your projects.

Jeff Coughlin

unread,
Apr 9, 2014, 5:23:49 PM4/9/14
to farcr...@googlegroups.com
>> To allow them to be defaulted in the config (rather than extending richtext.cfc), and also overridable in each formtool property, I think we'd need to do some smarter splitting/parsing of the JS config, or break those particular properties out into separate fields in the config (probably the better option).


Any thoughts on doing the second option (separate fields in the config)?

It's not the worst thing in the world to have to extend richtext.cfc on every site, but it just seems counterproductive since most people will likely be having to do it.

Jeff

Jeff Coughlin

unread,
Apr 10, 2014, 9:11:20 PM4/10/14
to farcr...@googlegroups.com
It just happened again when I did an updateapp (I was about to launch a new type and a new rule that I just created) and looking through the stack trace I see what the error is:

/Users/jeffcoughlin/Sites/_frameworks/farcry/core/p630/packages/types/farConfig.cfc

For some reason on just that one call it is trying to load p630's version of farConfig.cfc (which in turn causes the wddx error since we're not using wddx anymore in FC7) - the rest of the stack trace uses trunk (FarCry 7).

I'm not sure why at the moment. I don't use a cf mapping. I do have some websites that use p630 (loaded from a web alias), but I'm not running any of them (and I recently restarted CF without loading any other site).  Also confused why it does it sometimes but not others.  Mind boggling.

I know it's going to end up being something really stupid on my end, so not much you can do about it unless you have any ideas.  Otherwise it's likely nothing for you to worry about.

Jeff


Reply all
Reply to author
Forward
0 new messages