progressivetech / com.aghstrategies.petitionemail

an extension that will allow the sending of emails to legislators and newspapers
Other
0 stars 2 forks source link

No default email subject or To fields exposed in petition configuration page #5

Open hesco opened 2 years ago

hesco commented 2 years ago

Having achieved a successful installation I still see none of the interface changes suggested by the (README.md) documentation. Attempts to run the api4 calls fail with these errors:

    {
      "error_code": 0,
      "error_message": "Invalid field 'Letter_To.Recipient_System'"
    }

Grep'ing a db dump I find the petition stored in the civicrm_survey table. But describing that table shows no fields which would correspond to a Letter_To field. Grep'ing the dump finds no 'letter_to'. grep -iR letter_to vendor/civicrm/ comes up empty as well. A similar grep on web/sites/default/files/civicrm/ext finds multiple references in this extension's path. All seem to be to an _option_group, but a query on civicrmoption(group|value) tables found no reference to this value.

I tried diabling / uninstalling / reinstalling the extension. And encountered a 500 for each operation, reporting this error:

API error: is not of type String on OptionValue.create( entity name form) 

but otherwise, judging from the status reported on the /civicrm/admin/extensions?reset=1 page, these operations succeeded.

I am running out of options to try and would appreciate some guidance. Thanks.

JoeMurray commented 1 year ago

@mattwire ^

JoeMurray commented 1 year ago

@mjwconsult @jmcclelland ^

jmcclelland commented 1 year ago

Thanks for tagging me @JoeMurray , sorry, I don't seem to have notifications properly configured for this repo.

@hesco , are you installing from the main branch (not the master branch)?

The Letter To is a custom data group (that is reserved so doesn't appear in the UI but otherwise behaves like one). You should see it as a table with a civicrm_value prefix.

hesco commented 1 year ago

@jmcclelland : this is the listing in my build manifest (where this array's entries are process by my build pipeline).
I'd guess this means I am using the main branch for petitionmail and the master branch for the statelegemail repo.

extensions = (
    .  .  .  
  'com.aghstrategies.petitionmail@https://github.com/progressivetech/com.aghstrategies.petitionemail/archive/refs/heads/main.zip'
  'com.aghstrategies.statelegemail@https://github.com/progressivetech/com.aghstrategies.statelegemail/archive/refs/heads/master.zip'
)

and looking at the database, I see:

$ drush sqlq "SHOW TABLES;" | grep civicrm_value
civicrm_value_chass_support_2
civicrm_value_civizoom
civicrm_value_civizoom_registrant
civicrm_value_membership_ap_1

I'm guessing this means that no table build got triggered on installation.

Can you please point me to a recipe for rolling out a fully functional installation of this extension?

Thanks, -- Hugh

jmcclelland commented 1 year ago

Sorry for the slow response - yes, it does seem like you are not getting the tables built and you are using the main branch. I'm really not sure why. The tables are specified via the file petitionemail.mgd.php which should be in the root directory of your extension. Also, you will need to have CiviCRM API v4 enabled (unless you are running a very old version of CiviCRM it should be enabled - you can check by visiting /civicrm/api4 via your browser).