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) »
  • CiviMail 2.0.3 - not saving HTML / template issue
Pages: [1]

Author Topic: CiviMail 2.0.3 - not saving HTML / template issue  (Read 5184 times)

speleo

  • Ask me questions
  • ****
  • Posts: 396
  • Karma: 28
  • CiviCRM version: 4.3.1
  • CMS version: J! 2.5,9
  • MySQL version: 5.1
  • PHP version: 5.3.24
CiviMail 2.0.3 - not saving HTML / template issue
May 24, 2008, 08:21:22 am
I’ve got some really weird problems with CiviMail.

Not saving HTML content.
If I create a mailing and proceed to step 4 then my HTML preview is always blank. Using PMA to look at the record I see the civicrm_mailing.body_html field is empty even though I’ve got headers and footers. Somewhere the merge of header + content+ footer is broken on my site.

I’ve checked and double checked the resource URL and settings files. I’ve reset the session, deleted cache, cleared my browser data, tried FF2 FF3 & IE7, pulled a few hairs out…

Using templates
If I create a template and then go to select it in step 3 of a new mailing then the HTML content is placed into the plain text Compose On-Screen input box? Surely that ain’t right??

Any ideas?

pankaj

  • Guest
Re: CiviMail 2.0.3 - not saving HTML / template issue
May 27, 2008, 11:08:55 pm
Could not replicate both issues.
It will be helpful if you can reproduce it on demo http://drupal.demo.civicrm.org/ .

speleo

  • Ask me questions
  • ****
  • Posts: 396
  • Karma: 28
  • CiviCRM version: 4.3.1
  • CMS version: J! 2.5,9
  • MySQL version: 5.1
  • PHP version: 5.3.24
Re: CiviMail 2.0.3 - not saving HTML / template issue
May 28, 2008, 02:38:22 am
Can't reproduce on the demo.

I also just reinstalled 2.0.3 and am still having the same issue.

I'm getting a dojo error in firebug which could be a pointer:

dijit.byId("html_message") is undefined
[Break on this error] dijit.byId('html_message').setValue( message_html );

grep indicates that this is from civicrm/templates/CRM/Mailing/Form/Upload.tpl

This indicates the dojo editor is not going to return anything hence the blank mailer? If I go into PMA and enter some text into the html body and refresh step 4 then my mailing show up and works. Clicking the [previous] button will show an empty HTML message so dojo is definitely not picking this up.

Everything else dojo seems to work so I don't think it is a resource url issue.
Any ideas?

speleo

  • Ask me questions
  • ****
  • Posts: 396
  • Karma: 28
  • CiviCRM version: 4.3.1
  • CMS version: J! 2.5,9
  • MySQL version: 5.1
  • PHP version: 5.3.24
Re: CiviMail 2.0.3 - not saving HTML / template issue
May 29, 2008, 10:09:31 am
I've looked at the html on the demo site vs mine and it all looks similar but I'm on Joomla.

On mysite I get the error:

Code: [Select]
dijit.byId("html_message") is undefined
 line 703 dijit.byId("html_message").setValue( message_html );

I've seen in a forum that this could be due to a misformed DIV statement but I can't see it. Does anyone have this working on Joomla?

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: CiviMail 2.0.3 - not saving HTML / template issue
May 29, 2008, 12:32:50 pm

argh ..

i keep forgetting u r on joomla :)

I suspect we'll be able to reproduce this quite easily on our joomla install. I'll try to reproduce (and then fix) later today. sorry for the slow uptake on this :(

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

speleo

  • Ask me questions
  • ****
  • Posts: 396
  • Karma: 28
  • CiviCRM version: 4.3.1
  • CMS version: J! 2.5,9
  • MySQL version: 5.1
  • PHP version: 5.3.24
Re: CiviMail 2.0.3 - not saving HTML / template issue
May 29, 2008, 12:59:06 pm
no worries Lobo. I got to learn quite abit about dojo. 8)

Deepak Srivastava

  • Ask me questions
  • ****
  • Posts: 677
  • Karma: 65
Re: CiviMail 2.0.3 - not saving HTML / template issue
May 30, 2008, 04:15:37 am
A issue has been filed & fixed (for dojo error) - http://issues.civicrm.org/jira/browse/CRM-3170

Here is the fix - http://biryani.osuosl.org:8181/browse/CiviCRM/branches/v2.0/templates/CRM/Mailing/Form/Upload.tpl?r1=14387&r2=14820
Found this reply helpful? Contribute NOW and help us improve CiviCRM with the Make it Happen! initiative.

speleo

  • Ask me questions
  • ****
  • Posts: 396
  • Karma: 28
  • CiviCRM version: 4.3.1
  • CMS version: J! 2.5,9
  • MySQL version: 5.1
  • PHP version: 5.3.24
Re: CiviMail 2.0.3 - not saving HTML / template issue
May 30, 2008, 04:53:59 am
Hi Deepak,

Thats cleared the dojo error but it is still not saving the contents of the editor. A little more info:

If I save some text in civicrm_mailing.body_html while in step 4 and then click the previous button (to goto step 3) I would expect the code to pick up the text and place it in the HTML Message editor as it does for the text field. This doesn't happen and the editor is blank. If I then enter some text in HTML message and click next then the field is updated in the db but is now blank.

So it is writing to the database but not picking up the text from the editor.

pm me if you want access to my site
« Last Edit: May 30, 2008, 05:01:22 am by speleo »

Deepak Srivastava

  • Ask me questions
  • ****
  • Posts: 677
  • Karma: 65
Re: CiviMail 2.0.3 - not saving HTML / template issue
May 30, 2008, 05:43:15 am
There is a another small correction required -
http://biryani.osuosl.org:8181/browse/CiviCRM/branches/v2.0/templates/CRM/Mailing/Form/Upload.tpl?r1=14820&r2=14822

Check if this solves your problem.
Found this reply helpful? Contribute NOW and help us improve CiviCRM with the Make it Happen! initiative.

speleo

  • Ask me questions
  • ****
  • Posts: 396
  • Karma: 28
  • CiviCRM version: 4.3.1
  • CMS version: J! 2.5,9
  • MySQL version: 5.1
  • PHP version: 5.3.24
Re: CiviMail 2.0.3 - not saving HTML / template issue
May 30, 2008, 02:27:44 pm
Deepak,

Got a little further with that but only as far as the civicrm_mailing.body_html is now empty but not null.

Let me talk you through it.

Step 1: Create a new mailing and call it "test", assign a group to send to and click next. This creates a row in the civicrm_mailing table with most of the fields including civicrm_mailing.body_html being null.

Step 2: Track and respond (accept defaults) click next. A few more fields are populated. civicrm_mailing.body_html being null

Step 3
: Add some text to the HTML editor and assign a header and footer with contains the tokens required. Click next. civicrm_mailing.body_html is now blank but not null. The text is NOT saved.

Step 4: Since civicrm_mailing.body_html is no longer null the html preview is shown but it is blank.

From here clicking Previous shows step 3 again with the HTML message blank. At step 4, if I edit civicrm_mailing.body_html in phpMyAdmin and then click the Previous button to go back to step 3 it doesn't pick up the value in the db.

I can't get my head around what the code flow is here but it isn't working for me. What I don't understand is why nobody else has posted this before. I'm just trying to get CiviMail up and running. Is there nobody out there who is actually using it on Joomla? (J! 1.0.15)

Thanks for looking into this. Most appreciated.

Deepak Srivastava

  • Ask me questions
  • ****
  • Posts: 677
  • Karma: 65
Re: CiviMail 2.0.3 - not saving HTML / template issue
May 31, 2008, 09:29:43 am
Quote
Step 4: Since civicrm_mailing.body_html is no longer null the html preview is shown but it is blank.

I couldn't replicate this i.e i was able to see the html-text in the preview section. Not sure why it's not working for you.

Quote
From here clicking Previous shows step 3 again with the HTML message blank. At step 4, if I edit civicrm_mailing.body_html in phpMyAdmin and then click the Previous button to go back to step 3 it doesn't pick up the value in the db.

I did notice this problem which looks to be a editor related issue. However it's not a major issue as long as step 4 works fine i.e you can see the html-text in the preview section which doesn't look to be working in your case.


« Last Edit: May 31, 2008, 09:39:55 am by Deepak Srivastava »
Found this reply helpful? Contribute NOW and help us improve CiviCRM with the Make it Happen! initiative.

speleo

  • Ask me questions
  • ****
  • Posts: 396
  • Karma: 28
  • CiviCRM version: 4.3.1
  • CMS version: J! 2.5,9
  • MySQL version: 5.1
  • PHP version: 5.3.24
Re: CiviMail 2.0.3 - not saving HTML / template issue
May 31, 2008, 02:53:10 pm
Hi Deepak,

I just re-normalised my database to see if there was anything going on there. No change. Still not saving.

During this process I've reinstalled civicrm 2.0.3. on Joomla 1.0.15 and that makes not difference. 

The only thing I have tried is running CiviCRM on a different version of Joomla. I've got 1.53 installed as well but I've been holding off moving there until Civi 2.1.

I'm running on PHP Version 5.2.5 & MySQL 5.0.45-community so everything should be supported. I've not added any custom code to my civicrm setup.

Could you give me a pointer as to where to look to debug the code to see why it's not saving for me.

Cheers,

Henry

Deepak Srivastava

  • Ask me questions
  • ****
  • Posts: 677
  • Karma: 65
Re: CiviMail 2.0.3 - not saving HTML / template issue
May 31, 2008, 11:34:11 pm
I now installed Joomla1.0.15 + CiviCRM v2.0.4 against my earlier installation of Joomla1.0.14 + CiviCRM v2.0.4, thinking it might be a  joomla version issue but it's still working fine.

Don't think it's a code related issue. Still if you want to debug (might give you some clue), here are the files -
step1 => CRM/Mailing/Form/Group.php     &  templates/CRM/Mailing/Form/Group.tpl
step2 => CRM/Mailing/Form/Settings.php &  templates/CRM/Mailing/Form/Settings.tpl
step3 => CRM/Mailing/Form/Upload.php   &  templates/CRM/Mailing/Form/Upload.tpl
step4 => CRM/Mailing/Form/Test.php       &  templates/CRM/Mailing/Form/test.tpl

I just have one small question in back of my mind - Do you get any expected form error on step3 when you don't fill either of HTML or Text message, sth like -
Quote
Please correct the following errors in the form fields below:
    * Please provide either a Text or HTML formatted message - or both.
« Last Edit: June 01, 2008, 07:07:08 am by Deepak Srivastava »
Found this reply helpful? Contribute NOW and help us improve CiviCRM with the Make it Happen! initiative.

speleo

  • Ask me questions
  • ****
  • Posts: 396
  • Karma: 28
  • CiviCRM version: 4.3.1
  • CMS version: J! 2.5,9
  • MySQL version: 5.1
  • PHP version: 5.3.24
Re: CiviMail 2.0.3 - not saving HTML / template issue
June 01, 2008, 12:41:38 pm
Hi Deepak,

I've made some progress!!! Running on Joomla 1.0.15 I still get the problems we've discussed. To answer your question - yes I do get the expected error message about providing either a Text or HTML formatted message - or both.

I was curious if I would see the issue using CiviCRM 2.0.4 on Joomla 1.5.3 in native mode. So I installed 2.0.4 under 1.5.3 and it WORKS!

However installing was a problem. I followed the routine at http://civicrm.org/node/297 but ran into issues. The problem seemed to stem from the file com_civicrm/admin/civicrmcivicrm.config.php not being in the XML file. The symtom was it was not creating the settings file. A quick edit of civicrm.xml and sorted. You might want to look at this and see if the file has been left out by error...

So...many many thanks for your support with this issue. Moving forward I will shift to 2.1 when it is out. I was waiting on moving to J!1.5.3 until C!2.1 was out but since I've got it running now I'm well happy.

Cheers,  Henry

Pages: [1]
  • CiviCRM Community Forums (archive) »
  • Old sections (read-only, deprecated) »
  • Support »
  • Using CiviCRM »
  • Using CiviMail (Moderator: Piotr Szotkowski) »
  • CiviMail 2.0.3 - not saving HTML / template issue

This forum was archived on 2017-11-26.