CRM-15818 CiviMail Does Not Save Content When Using Drupal WYSIWYG

    Details

    • Type: Bug
    • Status: Done/Fixed
    • Priority: Trivial
    • Resolution: Won't Fix
    • Affects Version/s: 4.4.11, 4.5.5
    • Fix Version/s: 4.7
    • Component/s: CiviMail
    • Labels:
      None
    • Documentation Required?:
      None
    • Funding Source:
      Needs Funding

      Description

      When using the Drupal WYSIWYG integration all content save in the CiviMail "Mailing Content" window is not saved. I switched to an included WYSIWYG editor from the CiviCRM project and the problem does not repeat itself.

        Attachments

          Activity

          [CRM-15818] CiviMail Does Not Save Content When Using Drupal WYSIWYG
          Coleman Watts added a comment -

          The CiviMail interface has changed a lot in 4.6 - might want to check and see if it's still a problem in that version (check the online sandbox).

          Steve Kessler added a comment -

          I was not able to do this in the Sandbox because the Drupal WYSIWYG module is not enabled.

          I upgraded a dev copy of my site to the alpha 2 and I get this error when trying to edit a mailing.

          #0 /var/www/ccsdf/sites/all/modules/civicrm/CRM/Mailing/Info.php(90): civicrm_api3("MailingAB", "get", (Array:0))
          #1 /var/www/ccsdf/sites/all/modules/civicrm/CRM/Core/Page/Angular.php(107): CRM_Mailing_Info->getAngularModules()
          #2 /var/www/ccsdf/sites/all/modules/civicrm/CRM/Core/Page/Angular.php(32): CRM_Core_Page_Angular::getAngularModules()
          #3 /var/www/ccsdf/sites/all/modules/civicrm/CRM/Core/Page/Angular.php(24): CRM_Core_Page_Angular->registerResources(Object(CRM_Core_Resources))
          #4 /var/www/ccsdf/sites/all/modules/civicrm/CRM/Core/Invoke.php(307): CRM_Core_Page_Angular->run((Array:2), NULL)
          #5 /var/www/ccsdf/sites/all/modules/civicrm/CRM/Core/Invoke.php(82): CRM_Core_Invoke::runItem((Array:12))
          #6 /var/www/ccsdf/sites/all/modules/civicrm/CRM/Core/Invoke.php(54): CRM_Core_Invoke::_invoke((Array:2))
          #7 /var/www/ccsdf/sites/all/modules/civicrm/drupal/civicrm.module(404): CRM_Core_Invoke::invoke((Array:2))
          #8 [internal function](): civicrm_invoke("a")
          #9 /var/www/ccsdf/includes/menu.inc(517): call_user_func_array("civicrm_invoke", (Array:1))
          #10 /var/www/ccsdf/index.php(21): menu_execute_active_handler()
          #11

          {main}
          Coleman Watts added a comment -

          OK, that's the backtrace - can you help us debug this by also posting the error message?
          Have you tried the obvious things like clearing your cache?
          Does the same error happen when you create a mailing from scratch or is it only when editing a mailing?
          Does it happen when editing any mailing, or only certain ones (check with different mailing statuses).

          Steve Kessler added a comment -

          The error when editing an existing email is "DB Error: no such table". I get the same error when trying to create new mailing as well. To verify I did clear the caches. I cannot find a way it does not happen.

          Coleman Watts added a comment -

          I wonder which table is missing?

          Steve Kessler added a comment -

          It looks like it is the MailingAB table and I do not have a table called MailingAB.

          Coleman Watts added a comment -

          Did you run the upgrade script? Did it complete successfully?
          Look in your db - you should have a table named civicrm_mailing_abtest

          Steve Kessler added a comment -

          The table is not there but the upgrade scrip ran successfully.

          Kurund Jalmi added a comment - - edited

          Steve,

          Ideally "civicrm_mailing_abtest" should have been added during "4.6 alpha 1" stage of upgrade process. What was your upgrade path?

          Steve Kessler added a comment -

          I do not remember going back to the beginning but we went from 4.4.11 to 4.5.5 to 4.6.

          Thanks,
          Steve

          Coleman Watts added a comment -

          Looks like this bug has been fixed in recent betas - can you roll back to 4.5.x and try upgrading again with the latest 4.6 beta?

          Tim Otten added a comment -

          The discussion on this ticket has actually touched on two subjects – an error in the DB upgrade (i.e. missing civicrm_mailing_ab) and the integration with Drupal WYSIWYG. Reactions on both:

          1. I've taken the latest code and compared (a) the schema for a new install with (b) the schema for an upgraded site (4.5.0 => 4.6 circa revision cb113651a5) and confirmed that they have all the same tables, columns, and constraints (using SHOW CREATE TABLE on all CiviMail-related tables).

          2. As a bit of background: One of the major goals of the CiviMail UI rewrite is to perform a trial-run at replacing some old, EOL parts in the system (HTML_QuickForm, Smarty v2) with more modern, widely-used parts (AngularJS). Unfortunately, the configurable WYSIWYG stuff is deeply tied into HTML_QuickForm and would need to be rewritten/reconceived to work with Angular – and this hasn't been done yet. Consequently, CiviMail in v4.6 is hardcoded to use ckeditor.

          Using Drupal's WYSIWYG is a neat feature (e.g. when uploading files through the WYSIWYG's buttons, the CMS can provide its own file-manager), but it's also fairly complicated and makes it harder to add other features (such as the mail-merge token UI), and it's actually one example of a more general problem (ie revising widgets in Civi based on the CMS). We could try to rush out a work-around for v4.6, but I suspect we'd do a bad job on the v4.6 timeline. Instead, the hope is to keep this simple for v4.6 but – in the next version (4.7/5.0) provide an API which could make this customizable.

          Kurund Jalmi added a comment -

          Drupal wysiwyg editor is moved out of core. https://issues.civicrm.org/jira/browse/CRM-16354

            People

            • Assignee:
              Kurund Jalmi
              Reporter:
              Steve Kessler

              Dates

              • Created:
                Updated:
                Resolved: