Hi there,

I got following error when trying to reset the order of taxonomy terms to alphabetical with the button for roles using taxonomy access fix:

    Notice: Undefined index: #vocabulary in taxonomy_access_fix_form_taxonomy_overview_terms_alter() (Zeile 83 von sites/all/modules/taxonomy_access_fix/taxonomy_access_fix.module).
    Notice: Trying to get property of non-object in taxonomy_access_fix_form_taxonomy_overview_terms_alter() (Zeile 84 von /sites/all/modules/taxonomy_access_fix/taxonomy_access_fix.module).

How to reproduce:

Install module
set permission for role
go to admin/structure/taxonomy/your_vocabulary
click the "reset to alphabetical order"

Note: We use i18n on our site, so the vocabolary is translatable.

Comments

rudiedirkx’s picture

Reason and patch?

chowdhuriarijit’s picture

Assigned: Unassigned » chowdhuriarijit
kyuubi’s picture

I'm having the same issue.

george.plescan’s picture

There is a problem with the form alter, it does not check for the reset form.

You should add this at line 65:

  // If on reset order form return.
  if (isset($form['reset_alphabetical'])) {
    return;
  }
kyuubi’s picture

Thanks for that!

Can you submit a patch?

Cheers,

rudiedirkx’s picture

Thanks guys. But I'm away on holiday for a few more weeks, so no Drupal.

Duarte/kyuubi, I've given you GIT write access, so you can commit it. Be sure it's with the right commit message (with issue #). Thanks :-)

Or wait a few weeks.

rudiedirkx’s picture

Status: Active » Fixed

Alright. That took way too long. Fixed in dev.

Status: Fixed » Closed (fixed)

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

Amir Simantov’s picture

Status: Closed (fixed) » Active

Reactivating this issue for the following reasons:

1. Code of #4 did not work for me putting it in line 65. However, it seems to work if I put it in the beginning of the function after the user_access check.
2. I wanted to make sure this is the correct place but could not track the dev version mentioned in #7. Neither did I find this code in 7.x-2.x where it supposedly been patched as stated in #8.

Any comment on that? What about a new release?... [some smiley icon]

Thanks,
Amir

[Project BR]

rudiedirkx’s picture

It was fixed in d2c4d33 in 2.x. One commit after 2.1. No new release since, so still only dev.

Adding it in taxonomy_access_fix_form_taxonomy_overview_terms_alter() after or before the access check is fine. After should be line 65-ish. Looks like it's line 70 of 71.

Download dev and try it. Or download 2.1 and apply this patch.

If it works for you, I'll create a new release, because it's been too long.

  • rudiedirkx committed a35119c on 7.x-1.x
    Issue #2270807: Error when trying to save alphabetical order reset
    
rudiedirkx’s picture

Status: Active » Fixed

I'm absolutely positively sure it's fixed. And now in 1.x too.

New releases: 2.2 and 1.3

Status: Fixed » Closed (fixed)

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