This one took me awhile, with a lot of interesting testing.
I had a Rule setup to email a user when a node went to a certain Workflow state. Easy enough.
myemail@example.com works just fine!
To add a second email? Difficult. That's the part where you actually need to read the description in the TO section of the Action:
"The formatting of this string must comply with RFC 2822."
What's RFC 2822? No clue really, until I did some research. Read this if you want to know the whole RFC. https://tools.ietf.org/html/rfc2822#page-15
Based on Page 15 and looking at an email I had received through my GMail, I decided to try using the angle brackets. Here's what I got:
<myemail@example.com>, <jarod@example.com>
I re-ran the rule and received the email I was expecting. Jeepers!
My journey as a developer...from websites to other coding and development issues
Showing posts with label Drupal 7. Show all posts
Showing posts with label Drupal 7. Show all posts
Tuesday, June 7, 2016
Tuesday, November 20, 2012
Drupal User Admin module stack
Here's a stack of modules that I like which help a non-administrator manage their own users.
Administer Users By Role: http://drupal.org/project/administerusersbyrole
Role Delegation: http://drupal.org/project/role_delegation
Login One Time: http://drupal.org/project/login_one_time
No Current Password: http://drupal.org/project/nocurrent_pass
Once installed and enabled, I create a role ("site-owner" for example) and assign it the various permissions.
A few more little tricks and now the Site-Owner can create or cancel users, assign various roles, and send them a One Time Login link if needed.
One caveat I need to investigate...the Administrators (e.g., User 1) are still shown on the list of users (admin/people) and certain roles can be added or removed, but the Administrator role can't be removed and the Admin account can't be edited or canceled. Really the Site Owner can't do anything harmful to the Admin, but I'd prefer that account wasn't shown at all in the list. I need a module that will only show the users whose role is less than or equal to the current role.
Administer Users By Role: http://drupal.org/project/administerusersbyrole
Role Delegation: http://drupal.org/project/role_delegation
Login One Time: http://drupal.org/project/login_one_time
No Current Password: http://drupal.org/project/nocurrent_pass
Once installed and enabled, I create a role ("site-owner" for example) and assign it the various permissions.
A few more little tricks and now the Site-Owner can create or cancel users, assign various roles, and send them a One Time Login link if needed.
One caveat I need to investigate...the Administrators (e.g., User 1) are still shown on the list of users (admin/people) and certain roles can be added or removed, but the Administrator role can't be removed and the Admin account can't be edited or canceled. Really the Site Owner can't do anything harmful to the Admin, but I'd prefer that account wasn't shown at all in the list. I need a module that will only show the users whose role is less than or equal to the current role.
Thursday, October 18, 2012
Drupal 7, Services 3.x , Request and Response
Here is something that I just recently learned regarding request/response from a REST server.
In this case, I am using Drupal 7 with Services 3.x.
It's just one of those things I guess you don't lean until you need to, and I never had yet. It was difficult to find the info though.
Here is the scenario:
Here's what you need to do.
For some reason, Drupal was returning the response in XML format by default, I don't know why, but adding this header to the request immediately gave me back a JSON response.
In this case, I am using Drupal 7 with Services 3.x.
It's just one of those things I guess you don't lean until you need to, and I never had yet. It was difficult to find the info though.
Here is the scenario:
- You are calling a web service using JSON as the Content Type.
- You are getting back an XML response.
- You want to get back a JSON response.
Here's what you need to do.
Goto your services

Select "Edit Server"
Make sure the response formatter "json" is selected. It may already be.
Now in your JSON REQUEST, add the following header:
Accept = "application/json"
For some reason, Drupal was returning the response in XML format by default, I don't know why, but adding this header to the request immediately gave me back a JSON response.
Thursday, September 29, 2011
Updating modules and themes requires FTP access to your server
How to get rid of that pesky (D7) FTP issue when updating modules:
Updating modules and themes requires FTP access to your server
http://drupal.org/documentation/install/modules-themes/modules-7#comment-4690140
The short of it, change the owner of the sites/default directory to whoever the Apache default user is (www-data, apache, etc.)
Updating modules and themes requires FTP access to your server
http://drupal.org/documentation/install/modules-themes/modules-7#comment-4690140
The short of it, change the owner of the sites/default directory to whoever the Apache default user is (www-data, apache, etc.)
chown www-data sites/default
Subscribe to:
Posts (Atom)

