CiviCRM Community Forums (archive)

*

News:

Have a question about CiviCRM?
Get it answered quickly at the new
CiviCRM Stack Exchange Q+A site

This forum was archived on 25 November 2017. Learn more.
How to get involved.
What to do if you think you've found a bug.



  • CiviCRM Community Forums (archive) »
  • Old sections (read-only, deprecated) »
  • Support »
  • Using CiviCRM »
  • Using CiviMail (Moderator: Piotr Szotkowski) »
  • Content including message templates doesn't save in CiviMail
Pages: [1]

Author Topic: Content including message templates doesn't save in CiviMail  (Read 1590 times)

John Richardson

  • I post occasionally
  • **
  • Posts: 57
  • Karma: 0
    • Life Challenge of Southeastern Michigan
  • CiviCRM version: 4.5.4
  • CMS version: Drupal 7.x
  • MySQL version: 5.5.27
  • PHP version: 5.3.13
Content including message templates doesn't save in CiviMail
March 20, 2013, 06:59:21 am
Hi, I've posted this before, thought it was fixed, but no. I also have a post on broken token inserts. Not sure if the issues are related.

At the moment, I am using CKEditor and the WYSIWYG (developer) api. When I originally had the issue (content not saved, tokens don't insert) it seemed to be just the tokens that wouldn't insert into the content editing area. I then installed WYSIWYG so I could experiment with other editors like TNYMCE. Things seemed to go downhill. Now I'm not really sure whether the html content has ever really worked.

I am new and seem to have had lots of issues with my install. At this point I am not sure if tables have been corrupted, if settings are off or if my directory structure is amiss. I did download and install the latest version of CKeditor (once in libraries, per WYSIWYG, and then once in modules because WYSIWYG didn't seem to recognize the install. I downloaded a previous version of CKeditor (3.x) and WYSIWYG recognized it in the library but I couldn't save anything. I then tried to uninstall both CKeditor, CKeditor 3.x, and WYSIWYG; and reset to the default editor. Didn't work. Fatal errors.

At this point I am stuck with no way to edit and save content through mail. QUESTION: what is the best next step? Should I try to remove WYSIWYG and CKEditor again? Reset to defaults (everything works perfectly on the demo site)? What is the procedure for doing this the right way? What does the default directory structure look like? I am getting fatal javascript errors when I try to remove WYSIWYG. Should I remove the editors from libraries first, then delete WYSIWYG? BTW: the "uninstall" functionality in the modules administration seems to have no effect whatsoever.

Sorry I seem so lost on this. Hopefully, someone can get me started at least to troubleshoot, if not resolve. Thx for your help!

One other thing: In my WYSIWYG admin/config panels, CKeditor still says CKEditor 3.6.6.1.7696, even though I removed that directory and replaced it with CKEditor 7.x-1.12. I have re-cached and also run the update utility to no avail. I am able to edit CKeditor and set it up with my preferences, but why would WYSIWYG still apparently point to a non-existent directory name?
John Richardson

John Richardson

  • I post occasionally
  • **
  • Posts: 57
  • Karma: 0
    • Life Challenge of Southeastern Michigan
  • CiviCRM version: 4.5.4
  • CMS version: Drupal 7.x
  • MySQL version: 5.5.27
  • PHP version: 5.3.13
Re: Content including message templates doesn't save in CiviMail
March 20, 2013, 07:53:53 am
Okay, UPDATE: here is what I JUST did. Went to admin=>modules and uninstalled CKeditor and WYSIWYG (I also uninstalled some other modules like IMCE and others related to image editing). Then I deleted the directories. Now when I try to go into CiviCRM, I get the Fatal error: Call to undefined function wysiwyg_get_profile() in /home/lifechal/www/data/sites/all/modules/civicrm/drupal/civicrm.module on line 365. Here is the referenced line of code in the civicrm.module file:

Code: [Select]
{
      //we have to ensure that wysiwyg is loaded since
      //pages load only with ajax callbacks
      $formats = filter_formats();
      foreach ($formats as $id => $format) {
        wysiwyg_get_profile($id);
      }
      $path = drupal_get_path('module', 'filter');
      drupal_add_js($path . '/filter.js');
      drupal_add_css($path . '/filter.css');
    }

It appears that I may have previously screwed up an uninstall and perhaps deleted a folder before "uninstalling" through the modules admin. Now what? Can I fix this or is the site just broken? Help!
John Richardson

totten

  • Administrator
  • Ask me questions
  • *****
  • Posts: 695
  • Karma: 64
Re: Content including message templates doesn't save in CiviMail
March 20, 2013, 08:43:41 am
A thought: Civi is designed to use its own copy of CKEditor or TinyMCE by default -- integration with Drupal's WYSIWYG modules should be optional. So you might try setting Civi back to use a built-in WYSIWYG:

1. Navigate to "CiviCRM => Administer => Customize Data and Screens => Display Preferences" (a.k.a. civicrm/admin/setting/preferences/display?reset=1)
2. Set the "WYSIWYG Editor" to TinyMCE or CKEditor (not "Drupal Default Editor")
3. Save (Even if it doesn't look like you've changed anything, re-save the form.)

Regarding the problem with wysiwyg_get_profile(), I believe the problem is this:

1. While the Drupal WYSIWYG module was enabled, someone went to Civi's "Display Preferences". The "Drupal Default Editor" was presented as an option (because the WYSIWYG module was active).
2. The WYSIWYG module was disabled -- thus making "wysiwyg_get_profile" an undefined function
3. Internally, Civi was still configured to use "Drupal Default Editor" even though a dependency disappeared.

Regarding file structure generally, I'm not very familiar with Drupal's WYSIWYG modules, but I can speak about the copies bundled in Civi. These are stored under "sites/.../modules/civicrm/packages/". There generally shouldn't be any reason to touch them, but if you do and something goes wrong... then just re-extract the Civi tarball to get a pristine copy of the packages tree.

Donald Lobo

  • Administrator
  • I’m (like) Lobo ;)
  • *****
  • Posts: 15963
  • Karma: 470
    • CiviCRM site
  • CiviCRM version: 4.2+
  • CMS version: Drupal 7, Joomla 2.5+
  • MySQL version: 5.5.x
  • PHP version: 5.4.x
Re: Content including message templates doesn't save in CiviMail
March 20, 2013, 09:49:55 am

I filed and fixed this issue for 4.3 here:

http://issues.civicrm.org/jira/browse/CRM-12164

For the short term u can edit civicrm.module and comment out that line and/or reinstall the wysiwyg module

lobo
A new CiviCRM Q&A resource needs YOUR help to get started. Visit our StackExchange proposed site, sign up and vote on 5 questions

John Richardson

  • I post occasionally
  • **
  • Posts: 57
  • Karma: 0
    • Life Challenge of Southeastern Michigan
  • CiviCRM version: 4.5.4
  • CMS version: Drupal 7.x
  • MySQL version: 5.5.27
  • PHP version: 5.3.13
Re: Content including message templates doesn't save in CiviMail
March 20, 2013, 10:03:50 am
Thank you so much! UPDATE: Returning CiviCRM to default CKEditor seems to advance the issue. Now I can see the source code and it is saved in CiviMail, but I get no editing UI, no buttons, etc. for CKEditor. Is there somewhere to configure default CKeditor? (BTW: still can't insert tokens in CiviMail)...
John Richardson

John Richardson

  • I post occasionally
  • **
  • Posts: 57
  • Karma: 0
    • Life Challenge of Southeastern Michigan
  • CiviCRM version: 4.5.4
  • CMS version: Drupal 7.x
  • MySQL version: 5.5.27
  • PHP version: 5.3.13
Re: Content including message templates doesn't save in CiviMail
March 21, 2013, 09:23:30 am
Hi, I still can't get the CKeditor editing buttons to display (nor can I get the token insert to function, but I'm thinking it is unrelated). I am using the CiviMail default Ckeditor (I also tried tinyMCE to no avail). Wysiwyg is disabled in modules and I have commented out the offending line in Civicrm.module, per Lobo's suggestion :-). CKeditor is installed in packages for Civi and also in Libraries for WYSIWYG. The installation in packages has not been touched. Any ideas?

P.S. Other than the buttons for editing, other things now work that weren't working before, i.e. contents are saved but only code is displayed in editing windows. There is no "html or plain text", no "view source" or other option for the window, just the code (not a monospace font, but still displays properly in preview and send).
« Last Edit: March 21, 2013, 09:29:51 am by ideaman »
John Richardson

John Richardson

  • I post occasionally
  • **
  • Posts: 57
  • Karma: 0
    • Life Challenge of Southeastern Michigan
  • CiviCRM version: 4.5.4
  • CMS version: Drupal 7.x
  • MySQL version: 5.5.27
  • PHP version: 5.3.13
Re: Content including message templates doesn't save in CiviMail
March 21, 2013, 10:11:28 am
Question: Can I safely re-upload and replace the CKeditor directory in packages? Can I upload the latest "Full" version?
John Richardson

Pages: [1]
  • CiviCRM Community Forums (archive) »
  • Old sections (read-only, deprecated) »
  • Support »
  • Using CiviCRM »
  • Using CiviMail (Moderator: Piotr Szotkowski) »
  • Content including message templates doesn't save in CiviMail

This forum was archived on 2017-11-26.