The subscriptions_ui module prevents the Send module from sending e-mails when installed.

Steps to reproduce:
(1) Install the Subscriptions and Subscriptions UI modules. You do not need to install any of the other Subscriptions modules.
(2) Install and configure the Send module
(3) Browse to a page and click the link to e-mail the item
(4) The "Send to Friend" window will appear. Fill out the form and click Send
(5) The page will refresh without actually sending the e-mail
(6) Uninstall subscriptions_UI and try sending the e-mail again
(7) The e-mail will send successfully.

Comments

salvis’s picture

It's hard to say which module is at fault here. This will take time to investigate.

JStuckman’s picture

I believe that the problem is occurring because the Subscriptions module is injecting a form anywhere node content appears (even if no content types are enabled for subscription!)

The Send module has a screen where the user can enter the recipient, subject, and body of the e-mail. These screens have URLs like "send/send/80". The screen renders the content of the node that the user is trying to send. When Send renders this content, Subscriptions injects a form into the content like this:

<form action="/drupal-5.6/?q=send/send/80"  accept-charset="UTF-8" method="post" id="subscriptions-ui-node-form">
<div><input type="hidden" name="form_token" id="edit-subscriptions-ui-node-form-form-token" value="43b3fec7bef2d53d333206d1e8704189"  />
<input type="hidden" name="form_id" id="edit-subscriptions-ui-node-form" value="subscriptions_ui_node_form"  />
</div></form>

However, the entire page is already wrapped in a form, because this content is being rendered inside the form used by the Send module. The result is two Drupal forms nested inside each other. Then, when I hit the Submit button on the Send form (outer form), the proper callback is not being invoked. It seems probable that Drupal is confused by the nested forms.

Ultimately, the problem is that I don't want the "Subscriptions" controls to appear when content is not being rendered in the usual way (by visiting the /node/ URL). It's likely that this problem is affecting many modules other than the Send module. I suggest a whitelist or blacklist of URLs where the Subscriptions tool should or shouldn't appear.

salvis’s picture

Ok, try ANDing

(arg(0) == 'node' && is_numeric(arg(1)) && (!arg(2) || arg(2) == 'view'))

into the first if in subscriptions_ui.module.

JStuckman’s picture

This seems to fix the problem. Will the change go in the next version?

salvis’s picture

Yes. Thanks for pursuing it.

salvis’s picture

Version: 5.x-2.0-beta9 » 5.x-2.0-beta10
Status: Active » Fixed
Anonymous’s picture

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for two weeks with no activity.