If I set an $url_prefix in the settings page, the popup snippet "a[href*=messages/new]" can't work
This is the patch

CommentFileSizeAuthor
urlprefixproblemwithpopups.patch537 bytesPatrizio
Support from Acquia helps fund testing for Drupal Acquia logo

Comments

Status: Needs review » Needs work

The last submitted patch, urlprefixproblemwithpopups.patch, failed testing.

Patrizio’s picture

Status: Needs work » Needs review

urlprefixproblemwithpopups.patch queued for re-testing.

Status: Needs review » Needs work

The last submitted patch, urlprefixproblemwithpopups.patch, failed testing.

Patrizio’s picture

There are only two lines of code.
Someone can tell me why the patch fail?

Berdir’s picture

Nice catch, thanks for working on this. See below for reasons why it fails and what you need to improve.

--- privatemsg.module	2011-04-22 17:41:43.000000000 +0200
+++ privatemsgNew.module	2011-04-22 17:34:53.000000000 +0200

The file name is wrong, it needs to be just "privatemsg.module" so that the test bot knows which file to change.

+++ privatemsgNew.module	2011-04-22 17:34:53.000000000 +0200
@@ -2320,12 +2320,14 @@ function privatemsg_privatemsg_thread_op
+    $url_prefix = variable_get('privatemsg_url_prefix', 'messages');
     return array(
       '*' => array(
-        'a[href*=messages/new]' // Write new message

You should use http://api.worldempire.ch/api/privatemsg/privatemsg.module/function/priv... instead, so that it also works when the prefix is something like user/%user/messages.

+++ privatemsgNew.module	2011-04-22 17:34:53.000000000 +0200
@@ -2320,12 +2320,14 @@ function privatemsg_privatemsg_thread_op
   }

Trailing spaces added here, that line isn't necessary anyway.

Powered by Dreditor.

oadaeh’s picture

Issue summary: View changes
Status: Needs work » Closed (won't fix)

This issue is being closed because it is against a branch for a version of Drupal that is no longer supported.
If you feel that this issue is still valid, feel free to re-open and update it (and any possible patch) to work with the 7.x-1.x branch (bug fixes only) or the 7.x-2.x branch.
Thank you.