The issue

AES encryption settings for this module are not displayed in the most intuitive way.
If you have AES encryption enabled and set up to save encryption key to the database, it will display the message saying that AES encryption is not available.

This is because the module requires the site to store encryption key in the file system.

Solution

Add precise messages that will explain what is the status of AES encryption.
Here are the screenshots:

  1. AES not installed: http://i.imgur.com/V9gv4Tb.png
  2. AES not configured: http://i.imgur.com/62Pk5D2.png
  3. AES configured: http://i.imgur.com/6dO8NcX.png

Attached patch includes also three very minor fixes:

  1. Minor formatting in the switch statement of commerce_ups_encryption_available() function.
  2. Uses httpS://www.drupal.org instead of http://drupal.org when providing the link to AES module.
  3. Uses the correct link to AES module configuration page.

Thanks!

CommentFileSizeAuthor
#1 aes_messages-2386257-1.patch4.12 KBaramboyajyan

Comments

aramboyajyan’s picture

StatusFileSize
new4.12 KB
kfitz’s picture

Tested on fresh install:
Code address issue of uninformative messages and stays within scope of issue. No major changes or added functionality. Could use a couple of tests but other than that everything looks good.

kfitz’s picture

Status: Needs review » Reviewed & tested by the community
joelpittet’s picture

+++ b/commerce_ups.admin.inc
@@ -50,21 +50,30 @@ function commerce_ups_settings_form($form, &$form_state) {
+  if (commerce_ups_encryption_available(array('fail_threshold' => 'errors'))) {
...
+    elseif (commerce_ups_encryption_available(array('fail_threshold' => 'errors'))) {

Duplicate call in parent condition. Shouldn't this just be else?

ultimike’s picture

Status: Reviewed & tested by the community » Closed (won't fix)