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 CiviCampaign (Moderators: Kiran Jagtap, xavier) »
  • [SOLVED] Civipetition missing template
Pages: [1] 2

Author Topic: [SOLVED] Civipetition missing template  (Read 4260 times)

gandhiano

  • I’m new here
  • *
  • Posts: 10
  • Karma: 0
  • CiviCRM version: 3.3
  • CMS version: Drupal 6.x
  • MySQL version: 5.1
  • PHP version: 5.3
[SOLVED] Civipetition missing template
March 18, 2011, 03:18:39 pm
I have created a petition, but when I sign it, I get the following error:

No such message template: option group msg_tpl_workflow_petition, option value petition_confirmation_needed.

The signature is succesful (the contact data is submitted), but no e-mail confirmation is sent, as well as the problem with the message.

I imagine this has to do with some missing template, but I don't have a good knowledge of CiviCRM templating system, so I'm completely dark on where to look for this. I appreciate any help.
« Last Edit: March 23, 2011, 08:07:26 am by gandhiano »

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: Civipetition missing template
March 18, 2011, 03:42:07 pm

1. can u reproduce this on our demo server: http://drupal.demo.civicrm.org/

2. is this a new install or an upgrade?

3. what are the versions you are using

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

gandhiano

  • I’m new here
  • *
  • Posts: 10
  • Karma: 0
  • CiviCRM version: 3.3
  • CMS version: Drupal 6.x
  • MySQL version: 5.1
  • PHP version: 5.3
Re: Civipetition missing template
March 18, 2011, 03:50:27 pm
1. No, there it works ok

2. An upgrade (from 2.x, 2.2.x, if I'm not mistaken)

3. Drupal 6.5, CiviCRM 3.3.5

gandhiano

  • I’m new here
  • *
  • Posts: 10
  • Karma: 0
  • CiviCRM version: 3.3
  • CMS version: Drupal 6.x
  • MySQL version: 5.1
  • PHP version: 5.3
Re: Civipetition missing template
March 18, 2011, 04:01:13 pm
Just found out that with superuser it works (only had tested with anonymous). Some missing permission?

gandhiano

  • I’m new here
  • *
  • Posts: 10
  • Karma: 0
  • CiviCRM version: 3.3
  • CMS version: Drupal 6.x
  • MySQL version: 5.1
  • PHP version: 5.3
Re: Civipetition missing template
March 18, 2011, 04:23:42 pm
On a second thought, I the problem might not appear to a registered user because he does not require an e-mail confirmation (I guess I read this was the default behaviour for petitions).

Any clues?

xavier

  • Forum Godess / God
  • I’m (like) Lobo ;)
  • *****
  • Posts: 4453
  • Karma: 161
    • Tech To The People
  • CiviCRM version: yes probably
  • CMS version: drupal
Re: Civipetition missing template
March 19, 2011, 12:39:42 am
Quote from: gandhiano on March 18, 2011, 04:23:42 pm
On a second thought, I the problem might not appear to a registered user because he does not require an e-mail confirmation (I guess I read this was the default behaviour for petitions).

Any clues?

Hi,

yes, that's the default behaviour indeed.

Looks, like the template creation was skipped in one of the update skip?

The easiest might be to dump from an existing install the data of the template table (there is a format so each insert is a separate line), copy paste the two missing templates and apply them to your db.

X+
-Hackathon and data journalism about the European parliament 24-26 jan. Watch out the result

gandhiano

  • I’m new here
  • *
  • Posts: 10
  • Karma: 0
  • CiviCRM version: 3.3
  • CMS version: Drupal 6.x
  • MySQL version: 5.1
  • PHP version: 5.3
Re: Civipetition missing template
March 21, 2011, 03:45:11 pm
Followed the suggestion and extracted missing templates from original install DB dump.

INSERT INTO `civicrm_option_group` VALUES
( 76, 'msg_tpl_workflow_petition', 'Message Template Workflow for Petition',
'Message Template Workflow for Petition', 0, 1 );

INSERT INTO `civicrm_option_value` VALUES
(684,76,'Petition - need verification','2','petition_confirmation_needed',NULL,NULL,0,2,NULL,0,0,1,NULL,NULL,NULL),
(685,76,'Petition - signature added','1','petition_sign',NULL,NULL,0,1,NULL,0,0,1,NULL,NULL,NULL);



Still giving the same error... the only thing I changed from the original dump was the id number (67 was the original, but already taken). Trying disabling and re-enabling civicrm module, but no change :(

gandhiano

  • I’m new here
  • *
  • Posts: 10
  • Karma: 0
  • CiviCRM version: 3.3
  • CMS version: Drupal 6.x
  • MySQL version: 5.1
  • PHP version: 5.3
Re: Civipetition missing template
March 21, 2011, 05:06:45 pm
The templates were effectively missing from the database, but they continue not appearing in the template messages list (in CiviCRM admin).

I tried to empty the templates_c/ folder, as well as clearing drupal cache, but nothing changes. Should I clear any additional cache? What might be the reason that the template from the DB is not being recognized by CiviCRM?

xavier

  • Forum Godess / God
  • I’m (like) Lobo ;)
  • *****
  • Posts: 4453
  • Karma: 161
    • Tech To The People
  • CiviCRM version: yes probably
  • CMS version: drupal
Re: Civipetition missing template
March 21, 2011, 10:44:05 pm
Hi,
WHat you have are the config to say that the message to send is petition_confirmation_needed

You still need to INSERT it into the message table.

Search on the dump you have another petition_confirmation_needed, don't you?

X+
-Hackathon and data journalism about the European parliament 24-26 jan. Watch out the result

gandhiano

  • I’m new here
  • *
  • Posts: 10
  • Karma: 0
  • CiviCRM version: 3.3
  • CMS version: Drupal 6.x
  • MySQL version: 5.1
  • PHP version: 5.3
Re: Civipetition missing template
March 22, 2011, 02:35:03 am
No, only one entry for petition_confirmation_needed, the one I posted above :(

That is from a vanilla CiviCRM DB dump.

gandhiano

  • I’m new here
  • *
  • Posts: 10
  • Karma: 0
  • CiviCRM version: 3.3
  • CMS version: Drupal 6.x
  • MySQL version: 5.1
  • PHP version: 5.3
Re: Civipetition missing template
March 22, 2011, 05:35:52 pm
I was still missing the inserts into civicrm_msg_template. However, this is still not enough. The same error occurs.

As I did not find any field mapping between civicrm_msg_template and civicrm_option_group, I suspect there might be missing two to four inserts elsewhere, that are capable of making this link. However, I'm completely lost here.

Here the newly inserted rows.

Code: [Select]
INSERT INTO civicrm_msg_template VALUES
(104,'Petition - signature added','Thank you for signing {$petition.title}','Thank you for signing {$petition.title}.\n','<p>Thank you for signing {$petition.title}.</p>\n\n{include file=\"CRM/Campaign/Page/Petition/SocialNetwork.tpl\" petition_id=$survey_id noscript=true email=true}\n',1,556,1,0),
(105,'Petition - signature added','Thank you for signing {$petition.title}','Thank you for signing {$petition.title}.\n','<p>Thank you for signing {$petition.title}.</p>\n\n{include file=\"CRM/Campaign/Page/Petition/SocialNetwork.tpl\" petition_id=$survey_id noscript=true email=true}\n',1,556,0,1),
(106,'Petition - need verification','Confirmation of signature needed for {$petition.title}\n','Thank you for signing {$petition.title}.\n\nIn order to complete your signature, we must confirm your e-mail. \nPlease do so by visiting the following email confirmation web page:\n\n{$petition.confirmUrlPlainText} \n\nIf you did not sign this petition, please ignore this message.\n','<p>Thank you for signing {$petition.title}.</p>\n\n<p>In order to <b>complete your signature</b>, we must confirm your e-mail. \n<br />\nPlease do so by visiting the following web page by clicking\non the link below or pasting the link into your browser.\n<br /><br />\nEmail confirmation page: <a href=\"{$petition.confirmUrl} \">{$petition.confirmUrl}</a></p>\n\n<p>If you did not sign this petition, please ignore this message.</p>\n',1,557,1,0),
(107,'Petition - need verification','Confirmation of signature needed for {$petition.title}\n','Thank you for signing {$petition.title}.\n\nIn order to complete your signature, we must confirm your e-mail. \nPlease do so by visiting the following email confirmation web page:\n\n{$petition.confirmUrlPlainText} \n\nIf you did not sign this petition, please ignore this message.\n','<p>Thank you for signing {$petition.title}.</p>\n\n<p>In order to <b>complete your signature</b>, we must confirm your e-mail. \n<br />\nPlease do so by visiting the following web page by clicking\non the link below or pasting the link into your browser.\n<br /><br />\nEmail confirmation page: <a href=\"{$petition.confirmUrl} \">{$petition.confirmUrl}</a></p>\n\n<p>If you did not sign this petition, please ignore this message.</p>\n',1,557,0,1);

xavier

  • Forum Godess / God
  • I’m (like) Lobo ;)
  • *****
  • Posts: 4453
  • Karma: 161
    • Tech To The People
  • CiviCRM version: yes probably
  • CMS version: drupal
Re: Civipetition missing template
March 23, 2011, 07:51:49 am
The workflow_id 556 and 557 of civicrm_msg_template

Should be the same as in civicrm_option_values (now it's  684 and 685)

INSERT INTO `civicrm_option_value` VALUES
(684,76,'Petition - need verification','2','petition_confirmation_needed',NULL,NULL,0,2,NULL,0,0,1,NULL,NULL,NULL),
(685,76,'Petition - signature added','1','petition_sign',NULL,NULL,0,1,NULL,0,0,1,NULL,NULL,NULL);

update civicrm_msg_templae
-Hackathon and data journalism about the European parliament 24-26 jan. Watch out the result

gandhiano

  • I’m new here
  • *
  • Posts: 10
  • Karma: 0
  • CiviCRM version: 3.3
  • CMS version: Drupal 6.x
  • MySQL version: 5.1
  • PHP version: 5.3
Re: Civipetition missing template
March 23, 2011, 08:05:57 am
That was the missing link! When I imported the records from the vanilla DB, I missed that workflow_id was supposed to match the id in civicrm_option_value.

Now it works perfectly.

Special thanks to dlobo, dgg and xavier in IRC #civicrm!

ken

  • I live on this forum
  • *****
  • Posts: 916
  • Karma: 53
    • City Bible Forum
  • CiviCRM version: 4.6.3
  • CMS version: Drupal 7.36
  • MySQL version: 5.5.41
  • PHP version: 5.3.10
Re: [SOLVED] Civipetition missing template
March 24, 2011, 04:52:53 am
I have the same problem - missing Message Templates etc. (My environment is Drupal and 3.3.5)

Looking through the upgrade scripts, I can't see a script that adds these templates - this may be a widespread problem?

I also note subtle differences between my settings and those on the sandbox - Survey is a reserved activity type on the sandbox but not reserved on my server.

Are there any plans to fix these configuration issues with CiviCampaign settings?

Ken
« Last Edit: March 24, 2011, 05:17:59 am by ken »

gandhiano

  • I’m new here
  • *
  • Posts: 10
  • Karma: 0
  • CiviCRM version: 3.3
  • CMS version: Drupal 6.x
  • MySQL version: 5.1
  • PHP version: 5.3
Re: [SOLVED] Civipetition missing template
March 24, 2011, 05:09:05 am
Did you also make an upgrade from 2.x?

Pages: [1] 2
  • CiviCRM Community Forums (archive) »
  • Old sections (read-only, deprecated) »
  • Support »
  • Using CiviCRM »
  • Using CiviCampaign (Moderators: Kiran Jagtap, xavier) »
  • [SOLVED] Civipetition missing template

This forum was archived on 2017-11-26.