The user interface is not responding to my request to unsubscribe from a category term.

(1) Subscribe to a category term
(2) Access My account > Subscriptions
(3) Click the "Categories" tab
(4) You will see the subscription on this screen with a checkbox to the left.
(5) Uncheck the checkbox and click "Save"
(6) After clicking Save, the checkbox mysteriously checks itself again.
(7) Requests to change the send interval don't work either -- the "Save" button does not work.

No messages appear in the watchdog log.

CommentFileSizeAuthor
#7 subscriptions_taxonomy.multi_.patch1.86 KBsalvis

Comments

salvis’s picture

It should say "Your subscription was deactivated." Does it?

It works just fine for me. What kind of vocabulary is this? Please create a small plain vocabulary and try it with that one.

JStuckman’s picture

It doesn't say anything on the screen -- the form just reverts back to how it was.

I did some debugging of the form. The code that's failing is here:

  if ($form_values['op'] == $form_values['submit']) {
   .
   .
   .
    $module = $form_values['module'];
    $field = $form_values['field'];
    foreach ($form_values as $element_values) {
      if (isset($element_values['defaults']['send_interval'])) {
      .
      ...do everything here...
      .
      }

There is never a form element that has a "send_interval" property inside the "defaults" property, so no form elements get processed...

I'm not sure what kind of "small plain vocabulary" you want me to make; I can unsubscribe from a restricted category group and a non-restricted vocabulary, and it fails for both.

gustav’s picture

I can confirm this: the form simply doesn't save anything. No matter what changes one makes to the tickboxes, after pressing on Save it reverts back to the previous state.

JStuckman’s picture

More debugging:

$form_values[0] contains the POST data that you want to process, but $form_values[0]['defaults'] is an empty array.

I'm not sure why this would happen, because I don't have experience in coding Drupal forms.

salvis’s picture

Status: Active » Postponed (maintainer needs more info)

Let's not talk about debugging at this point. I'd be happy to just reproduce the problem.

I go to user/1/subscriptions/taxa, where I have a forum vocabulary. I have all controls enabled, i.e. I have three checkboxes and a drop-down select control per row. I can activate and deactivate any of the checkboxes, and if I change the left-most ones (and click [Save], of course), then I get the appropriate "Your subscription was de/activated." messages.

Can you try this set-up? Or describe me yours?

JStuckman’s picture

Status: Postponed (maintainer needs more info) » Active

Some more information:

When only one simple vocabulary is enabled for subscriptions, everything works.

When two simple vocabularies are enabled, the UI lets me unsubscribe terms in the second vocabulary (the one on the bottom) but not the first (the one on the top).

This was easy to reproduce. Just create two simple vocabularies, with the default settings. Enable them for subscriptions and disable the others.

salvis’s picture

Status: Active » Needs review
StatusFileSize
new1.86 KB

This has helped, thanks.

Please try this patch. It'll probably have some offsets, because I've made other changes in the meantime, but I hope you can still get it to apply.

JStuckman’s picture

This patch fixes the problem.

(I'm not sure how easy it is to apply -- I edited the code by hand instead of running the patch program. But the code changes work.)

salvis’s picture

Thanks! This fixed two serious bugs — it'll be in the next BETA of course.

salvis’s picture

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

Status: Fixed » Closed (fixed)

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