Defect: CKEditor Snippet Tool XFormsPro

mnacko's picture

After installing the CMS 12.3.0 and XFP 3.2.22 patches in our production environment, we uncovered yet another issue regarding the snippet tool. We thought this issue was resolved in our first modification but it turns out there is not one but three different CKEditor configuration files. Unfortunately, Jadu's suggestion was that they strongly recommended we roll back our upgrade which would put us back to Continuum #2. We have not been able to upgrade past that as there have been no stable versions since.


To fix the issue in XFormsPro, follow the instructions in this thread, then you will also need to edit the public_html/jadu/editors/ckeditor/xfp_config/xfp_config.js file and add this line before the closing config bracket.
config.protectedSource.push( /<([\S]+)[^>]*class="snippet"[^>]*>(.|\n|\r)*<\/\1>/g );

Additionally, the save function that replaces "Placebolder" with the actual javascript is triggered by the "ckBeforeSave" class which is missing from the template all together. You will need to edit public_html/jadu/xforms2/xforms_page_details.php and do a search for "Save Page". Change the input line as below adding in the "ckBeforeSave" class.
<input type="submit" class="button ckBeforeSave" value="Save Page" name="saveFormPage" />

You will also need to update the class for the save button in public_html/jadu/xforms2/xforms_form_details.php, do a search for "Save". Change the input line as below adding in the "ckBeforeSave" class.
<input type="submit" class="button ckBeforeSave" value="Save" name="submit" />

Save everything and make sure to clear your browser's cache before trying again.

Hopefully Jadu addresses these problems soon as we rely heavily on the snippet tool to inject Javascript to our pages and forms.