Support from Acquia helps fund testing for Drupal Acquia logo

Comments

szeidler’s picture

subscribing

michaelfavia’s picture

Title: Menu doesn't update when term is added » Menu doesn't update when term is added or edited

@peasoup: this is obviously not intended operation. It seems that somewhere in the module the hook_taxonomy_term_insert/update() isn't firing correctly. I need this as well so ill look into it if i have a moment later. Would appreciate advice from maintainer on any known issues/direction.

michaelfavia’s picture

Version: 7.x-1.1 » 7.x-1.x-dev
dstol’s picture

@michaelfavia, I'm not aware of this one. Is it reproducible by just adding a term (I'm not able to reproduce it that way) or are there some more steps here?

What other modules are enabled?

sylvaincharles’s picture

It would be really great if the menu get updated when adding a new term (or updating).
Is is planned to be implemented in D7 or shoud this already work?

Peasoup’s picture

@dstol:
No other steps are needed to reproduce this. I just login as no-admin, try to add or update a term, it is written correctly into the taxonomy as i can see as admin, but it doesn't appear in the menue. The menue point DOES appear if you add content to that menu though.
I did a tiny workaround and made the module call the function behind the checkbox everytime. It's not pretty, but it does the job for now. So the module seems to work fine, it just doesn't fire the rebuild function when a term is added/updated.

tangamampilia’s picture

suscribing

Actually I guess it is a Drupal Core bug. For a weird reason Drupal is not firing the hook_taxonomy_term_insert and hook_taxonomy_term_update. I'm trying to implement both functions on a custom module and I noticed it's not working. Then I tried to look how Taxonomy menu is managing the insert/updates and I noticed it not working also.

tangamampilia’s picture

Weird,

I triggered a event using Rules and then hook_taxonomy_term_insert started to work. I deleted the Rule and still working on my module... but Taxonomy is not working yet.

RoSk0’s picture

subscribing

andypost’s picture

Status: Active » Needs work

This caused by commented-out code in taxonomy_menu_form_alter()

    //get taxonomy menu form options
    //$form['taxonomy_menu']['options'] = _taxonomy_menu_create_options($form['vid']['#value']);
    //

This leads to emptiness of 'taxonomy_menu_sync_' variables so no reaction on taxo-hooks

Related #1096304: Taxonomy Menu options from D6 version

dboulet’s picture

Subscribe

sleamey’s picture

Last night I did some research starting with uncommenting mentioned in #10 and was able to get menu updated on adding/deleting term without any warnings (no updating on changing term properties yet). The problem is that most functions expect different data structures in arguments than they are passed by callers.

I can provide patch later if there is a need, but it is definitely a temporary solution.

sleamey’s picture

One more thing: implementation of hook_taxonomy_term_update() was incorrectly named "taxonomy_menu_taxonomy_menu_term_update" instead of "taxonomy_menu_taxonomy_term_update"

finally I got this working with updating terms too, but for now it seems impossible to update menu after rearranging terms using drag'n'drop interface, since hook_taxonomy_term_update doesn't fire for any term in this case (#1166610: hook_taxonomy_term_update doesn't trigger when rearranging terms using drag'n'drop)

PGO’s picture

subscribe

I am interested to have this issue fixed.

remaye’s picture

Subscribing too ... even for temporary solution !
I'm really missing this D6 feature in D7. This lack make this great module quite unusable when having the same needs as described in #1.
Please let us know when some workarround will be available...
Thanks !

courtney.mob’s picture

subscribe

Mark Trapp’s picture

Subscribe.

akamaus’s picture

subscribe

typoagrafka’s picture

Also subscribe.

anthonyR’s picture

subscribe

svendecabooter’s picture

Here is a patch that exposes the sync option that was hidden in the Taxonomy Menu code.
The other options that were in the code are being disabled by the patch, as they seem to break things...

Applying this patch will update the Taxonomy menu when a taxonomy term has been added, updated or deleted.
It also updates the menu if you rearrange the order via drag & drop, however you'll have to save it twice (can't figure out why at this point... will need to investigate more).

This is more of a workaround patch to get this functionality working. Once this feature gets implemented as intended by the module authors, this patch will no longer be needed.

dstol’s picture

Status: Needs work » Needs review
rjacobs’s picture

Thanks Sven,

Your patch seems to work (and things now update the way I remember from the D6 version of Taxonomy Menu). However, each time a menu update fires (based on a term addition/deletion/etc...), I'm seeing the following php notices:

  • Notice: Undefined index: tid in _taxonomy_menu_create_item() (line 753 of /Common Media/MAMP Data/htdocs/drupal 7 base/htdocs/sites/all/modules/taxonomy_menu/taxonomy_menu.module).
  • Notice: Undefined index: vid in _taxonomy_menu_create_item() (line 753 of /Common Media/MAMP Data/htdocs/drupal 7 base/htdocs/sites/all/modules/taxonomy_menu/taxonomy_menu.module).
  • Notice: Undefined property: stdClass::$parents in _taxonomy_menu_create_item() (line 774 of /Common Media/MAMP Data/htdocs/drupal 7 base/htdocs/sites/all/modules/taxonomy_menu/taxonomy_menu.module).
  • Notice: Undefined property: stdClass::$parents in _taxonomy_menu_create_item() (line 781 of /Common Media/MAMP Data/htdocs/drupal 7 base/htdocs/sites/all/modules/taxonomy_menu/taxonomy_menu.module).
  • Notice: Undefined index: mlid in _taxonomy_menu_create_item() (line 801 of /Common Media/MAMP Data/htdocs/drupal 7 base/htdocs/sites/all/modules/taxonomy_menu/taxonomy_menu.module).

I have not had time to look at the code to see what might be behind these notices... I just wanted to report them here first.

Ryan

alb’s picture

which is the patch for drupal 6?

rjacobs’s picture

@alb, This particular issue thread relates specifically to the Drupal 7 version of Taxonomy Menu. As far as I know none of the issues described here apply to the Drupal 6 version of the module. In fact, the patch here seems to add functionality that exists in the Drupal 6 version to the Drupal 7 version.

If you encounter issues specific to the Drupal 6 version of Taxonomy Menu, you'll want to open a separate issue thread for that.

alb’s picture

ok
but another solution for to solve this problem, that think is same for d6 or d7, is
to recall the function:
function taxonomy_menu_vocab_submit($form, &$form_state) {}

in own module and by a form that you like;

problem is that the original form where you click on submit is taxonomy_form_vocabulary,
and the parameter $form_state use the values of this form;
if you are in another form and recall the function how can also recall the same $form_state
values?

so, if you can in any form, take the $form_state's values of taxonomy_form_vocabulary
also if is closed but directly by code (not know if with a simulation or tips or drupal or php
function) then you can use the function used by checkbox "Select to rebuild the menu on submit.

Ambient.Impact’s picture

I'm still seeing this problem with 7.x-1.2, hope it gets sorted out soon.

OldAccount’s picture

Same problem, using 7.x-1.2.

kehan’s picture

subscribing

magicmyth’s picture

I've just run into this same issue myself. I've applied Sven's patch and got the notices about $parents not being set Sticking a watchdog that records a print_r of the $term shows that most of the time it does not contain the $parent property. So I've just done a workaround that finds the parent information if $parent is not set. Its just a quick hack so I have not made a patch yet but if I get a bit more time I'll post one but the fix is to go to about line 774 in taxonomy_menu.module which should look like:

  // get the first parent
  if (is_array($term->parents)) {
    foreach ($term->parents as $key => $val) {
      $ptid = $val;
      break;
    }
  }
  else {
    $ptid = $term->parents;
  }

And change it to:

  //Sometimes $term->parents is not set so we find it.
  if (!isset($term->parents)) {
    $tree = taxonomy_get_tree($term->vid);
    foreach($tree as $item) {
      if ($item->tid == $term->tid) {
        $term->parents = $item->parents;
        break;
      }
    }
  }
  // get the first parent
  if (is_array($term->parents)) {
    foreach ($term->parents as $key => $val) {
      $ptid = $val;
      break;
    }
  }
  else {
    $ptid = $term->parents;
  }

Note that you will still get the notice error when you delete a term. I think this is because _taxonomy_menu_create_item() is called after the term has been removed and thus taxonomy_get_tree() will not contain it. You could possibly fix that by again checking if (!isset($term->parents)) and setting $ptid to 0 after the loop but I don't know much of the code flow to this module and it might break the delete rather than help.

Adam

jessehs’s picture

Status: Needs review » Needs work
FileSize
4.83 KB

This is the patch from #21 re-rolled, and modified slightly. It also adds some code from #30 to prevent the php notice in certain cases and when deleting terms. I've commented out the submit handler for the term overview page, since re-building the menu is ridiculous when submitting this form. It should re-save the menu items for the terms that have changed, not delete them and start over.

Marking this as "needs work."

healycn’s picture

subscribing

adamdicarlo’s picture

Status: Needs work » Needs review
FileSize
5.27 KB

Here's a reroll of #31 in git format-patch format with commit message and primary authorship attributed to svendecabooter. Works with drush make.

OldAccount’s picture

Applied and tested the patch in #33, worked for me, thanks!

Status: Needs review » Needs work

The last submitted patch, taxonomy_menu.1104028-33.patch, failed testing.

minneapolisdan’s picture

subscribe

amfis’s picture

Now with patch #33 taxonomy menu does not get updated.

waynedpj’s picture

subscribe

johnv’s picture

subscribe.

calculus’s picture

subscribe

ranx’s picture

subscribe

minneapolisdan’s picture

Is the patch at #33 the way to go, then? I see one user posted that it worked, but I haven't seen any additional comments about it being committed.

dstol’s picture

Status: Needs work » Needs review

#33: taxonomy_menu.1104028-33.patch queued for re-testing.

Status: Needs review » Needs work

The last submitted patch, taxonomy_menu.1104028-33.patch, failed testing.

johnv’s picture

Title: Menu doesn't update when term is added or edited » Port Taxonomy Menu options from D6 to D7: Sync menu when term is added or edited
Status: Needs work » Needs review
FileSize
9.27 KB
9.25 KB

This is the patch from #31, and contains:
- includes updating/syncing the menu when the terms are re-arranged on the overview/list page again without rebuilding the menu;
- moved 3 content of hooks to a common function, reducing code base;
- changed messages to be more in line with core term messages.

johnv’s picture

This is the right one..

Status: Needs review » Needs work

The last submitted patch, taxonomy_menu.1104028-46.patch, failed testing.

johnv’s picture

johnv’s picture

Status: Needs work » Needs review

Status: Needs review » Needs work

The last submitted patch, taxonomy_menu.1104028-48.patch, failed testing.

johnv’s picture

Status: Needs work » Needs review
FileSize
9.87 KB

struggling with git..

amfis’s picture

Nope. Patch @ #51 screwed my site totally.

1. my custom menu links are gone (i'm using multilanguage setup)
2. there is a typo in line 88 (taxonomy_menu.module):

There is:
$form['#submit'][] = 'taxonomy_menu_vocab_submit';
Should be:
$form['#submit'][] = 'taxonomy_menu_vocabulary_submit';

3. My custom-menu path settings are gone
4. Custom menu paths automatically adds term name (while "use term name" - unchecked)

The bug which persists:
- taxonomy_menu does not handle sub-terms in question of custom-menu paths. For example I have this like taxonomy tree:

Vocab 1
- Parent term 1
-- Child term 1
-- Child term 2

Using custom-menu path: my-custom-view/%/% (view already exists with two arguments as noted in readme file) and path depth with setting: 2.

Generated menu paths are as follows:

for parent term:
- site.com/parent-term-1

for child term 1:
- site.com/child-term-1 : should be -> : site.com/parent-term-1/child-term-1

johnv’s picture

@amfis. I hope you first used it on a test-site :-)
ad 2. Did you patch by hand? The patch is correct regarding: +$form['#submit'][] = 'taxonomy_menu_vocabulary_submit';
ad 1, 3: do you use some module to generate custom menu links/paths. e.g. pathauto? Are the paths correctly generated when you save the VocabularyEdit-page with option 'Select to rebuild the menu on submit' ?

Do you have a fresh site, or are you upgrading from D6? Then you might suffer from a lack of features, which is outside the scope of this issue. The only option in D7 = menu path = Default, which does not provide site.com/Parent/child . Most options of D6-version are not supported yet (perhaps in other issues).

amfis’s picture

Hi again,
well it was a dev site, which is used to deploy a live site from it.

Anyhow, I added some custom code and everything apart alias hierarchy worked just fine. I'll do more about this and I'm sure everything will work.

I do have experience in writing such module for D6 and in comparison D7 is nearly no different at all.

If anything good comes up from this, I'll do my best to share it with Drupal community.

And your questions:

ad 2. Did you patch by hand? The patch is correct regarding: +$form['#submit'][] = 'taxonomy_menu_vocabulary_submit';
I used Eclipse for patching.

ad 1, 3: do you use some module to generate custom menu links/paths. e.g. pathauto? Are the paths correctly generated when you save the VocabularyEdit-page with option 'Select to rebuild the menu on submit' ?
Used taxonomy menu custom paths module, which is in a proposal state in issue queue.

Do you have a fresh site, or are you upgrading from D6?
A fresh D7.8 site, although there is a few my-own patches applied for multilingual support.

Things to consider

P.S. Nearly all contrib modules does not work with more than 1 language installed and where English is not default language.

johnv’s picture

Title: Port Taxonomy Menu options from D6 to D7: Sync menu when term is added or edited » Option 'Sync menu' in D7
FileSize
9.87 KB

Attached patch is a bit cleaner then the last one:
- without changing message texts; without renaming 'taxonomy_menu_vocabulary_submit'. These have nothing to do with this issue and cause unnecessary changes with D6 and other issues.

@amfis, it should apply cleanly for you, too, now.
You other isses are out of scope for this issue, which is only about syncing menu and vocabulary:
- custom menus, see #1035446: Custom menu paths in D7
- i18b, see #1228294: i18n support broken taxonomy_menu_translated_menu_link_alter errors

goldlilys’s picture

Subscribing

adamdicarlo’s picture

@goldlilys, next time, click the "Follow" button at the top right of the issue page instead of commenting -- there is no need to comment to subscribe to issues anymore.

johnv’s picture

The attached patch in #55 is not correct. Please use this one.

Status: Needs review » Needs work

The last submitted patch, taxonomy_menu.1104028-58.patch, failed testing.

johnv’s picture

Category: bug » feature
Status: Needs work » Needs review
FileSize
7.84 KB

Status: Needs review » Needs work

The last submitted patch, taxonomy_menu.1104028-58.patch, failed testing.

johnv’s picture

FileSize
33.67 KB

It seems I don't know how to create a proper patch.
Here's the complete module file. It has some rework over patch #58.

StryKaizer’s picture

FileSize
15.11 KB

Here's the patch from johnv, with a small bugfix added.

StryKaizer’s picture

Category: feature » bug
Status: Needs work » Needs review

Needs review

alex.skrypnyk’s picture

Status: Needs review » Needs work
Issue tags: +hierachy, +synchronization

Patch works, except for 2 problems:

Problem 1: Level changing synchronization.
Example:

Term1
- Term11
- Term12
Term2
- Term21
- Term22
New term1 <-- new term added to root level

Taxonomy menu syncs properly - all good.

Now, trying to move 'New term1' under 'Term1'.
Term1
- New term1 <-- this is where it should be inserted
- Term11
- Term12
Term2
- Term21
- Term22
- New term1 <-- this is where it is actually inserted. Incorrect
Taxonomy menu does not pick this level change - 'New term1' stays at root level.

Problem 2: Incorrect alphabetical order
If 'New term1's' parent was specified at the time of term creation, Taxonomy Menu adds it to the end of terms list rather then insert it in alphabetical order.

Term1
- New term1 <-- this is where it should be inserted
- Term11
- Term12
- New term1 <-- this is where it is actually inserted. Incorrect
Term2
- Term21
- Term22

johnv’s picture

Alex, I tried to reproduce your problems, but did not succeed.
ad problem 1) in my system your situation works fine. one difference: the "New term1 <-- new term added to root level" is inserted on top, not on bottom.
ad problem 2) IMO taxonomy menu does not work with alfabets but with weigths. So you have to specify a weight in order to place the new term directly at the right spot (in other words: 'guess the weight' and re-arrange the terms)

alex.skrypnyk’s picture

I had a fresh D7 install and dev version of TM patched (patch from #63) when had those problems. I don't know why you can't reproduce.

As for 2) - I thought weights is taken from taxonomy page, where terms have weight, and when sync happens menu weights get rebuilt according to term weights. But now it explains why. Is is possible to add an option to always rebuild menu (I mean totally rebuild, not just alter existing/create new entries) when vocabulary is modified?

johnv’s picture

Alex, I did find the following after your post: The button [Reset to alphabetical] does not work. I have actived that (patch follows).
And now I can see your problem and another one:

Problem 1: Resetting to alfabetical does not sort correctly, but ONLY if text is different after space.
Problem 2: Changing the name of a term, does not provoke rebuilding the menu.

Is is possible to add an option to always rebuild menu (I mean totally rebuild, not just alter existing/create new entries) when vocabulary is modified?

We should ask previous contributors for this: you can "Select to rebuild the menu on submit." but this throughs an ugly progress bar, and is more time consuming.

johnv’s picture

Status: Needs work » Needs review
FileSize
19.12 KB

OK, this does the following:
- renaming a term triggers syncing also (corrected function name to 'taxonomy_menu_taxonomy_term_update()' );
- choosing 'Reset to alphabetical' triggers syncing also;
- cleanup of _taxonomy_menu_create_item()
- minor cleanups;

Current status (IMO):
Problem: Resetting to alfabetical does not sort correctly, but ONLY if text is different after space.
Feature request: multiple parents does not work.

dstol’s picture

I think the bug alex.designworks might be seeing is related to the core bug below.

#550254: Menu links are sometimes not properly re-parented

jeff.maes’s picture

I did my best to port the patch of johnv to the latst dev (2011-Nov-30).
It seems to do the job very well!

troyer’s picture

If I update a node with a new taxonomy term with the patch from #71 applied, I get the following error. Looks like the patch is causing some problems with Entity Cache.

Notice: Undefined variable: item in _taxonomy_menu_create_item() (line 834 von /Users/web/drupal/sites/all/modules/taxonomy_menu/taxonomy_menu.module).
Warning: array_flip() [function.array-flip]: Can only flip STRING and INTEGER values! in EntityCacheControllerHelper::entityCacheLoad() (line 64 von /Users/web/drupal/sites/all/modules/entitycache/entitycache.module).
Warning: array_flip() [function.array-flip]: Can only flip STRING and INTEGER values! in DrupalDefaultEntityController->cacheGet() (line 354 von /Users/web/drupal/includes/entity.inc).
Warning: array_flip() [function.array-flip]: Can only flip STRING and INTEGER values! in EntityCacheControllerHelper::entityCacheLoad() (line 64 von /Users/web/drupal/sites/all/modules/entitycache/entitycache.module).
Warning: array_flip() [function.array-flip]: Can only flip STRING and INTEGER values! in DrupalDefaultEntityController->cacheGet() (line 354 von /Users/web/drupal/includes/entity.inc).
Warning: array_flip() [function.array-flip]: Can only flip STRING and INTEGER values! in EntityCacheControllerHelper::entityCacheLoad() (line 64 von /Users/web/drupal/sites/all/modules/entitycache/entitycache.module).
Warning: array_flip() [function.array-flip]: Can only flip STRING and INTEGER values! in DrupalDefaultEntityController->cacheGet() (line 354 von /Users/web/drupal/includes/entity.inc).
Warning: array_flip() [function.array-flip]: Can only flip STRING and INTEGER values! in EntityCacheControllerHelper::entityCacheLoad() (line 64 von /Users/web/drupal/sites/all/modules/entitycache/entitycache.module).
Warning: array_flip() [function.array-flip]: Can only flip STRING and INTEGER values! in DrupalDefaultEntityController->cacheGet() (line 354 von /Users/web/drupal/includes/entity.inc).
PDOException: SQLSTATE[23000]: Integrity constraint violation: 1048 Column 'menu_name' cannot be null: INSERT INTO {menu_links} (menu_name, plid, link_path, hidden, external, has_children, expanded, weight, module, link_title, options, customized, updated) VALUES (:db_insert_placeholder_0, :db_insert_placeholder_1, :db_insert_placeholder_2, :db_insert_placeholder_3, :db_insert_placeholder_4, :db_insert_placeholder_5, :db_insert_placeholder_6, :db_insert_placeholder_7, :db_insert_placeholder_8, :db_insert_placeholder_9, :db_insert_placeholder_10, :db_insert_placeholder_11, :db_insert_placeholder_12); Array ( [:db_insert_placeholder_0] => [:db_insert_placeholder_1] => 0 [:db_insert_placeholder_2] => taxonomy/term/ [:db_insert_placeholder_3] => 0 [:db_insert_placeholder_4] => 0 [:db_insert_placeholder_5] => 1 [:db_insert_placeholder_6] => 1 [:db_insert_placeholder_7] => [:db_insert_placeholder_8] => taxonomy_menu [:db_insert_placeholder_9] => [:db_insert_placeholder_10] => a:1:{s:10:"attributes";a:1:{s:5:"title";N;}} [:db_insert_placeholder_11] => 0 [:db_insert_placeholder_12] => 0 ) in menu_link_save() (line 3066 von /Users/web/drupal/includes/menu.inc).
johnv’s picture

New problem with this patch:
- set a taxonomy_menu to 'synced'
- set one of the menu-items to 'disabled'
- change the taxonomy (add a term)
- the taxonomy_menu is has now 2 new items: the new one, and the disabled one is back enabled.

(This should not delay committing the patch - which works fine otherwise, but better be treated as a minor follow-up issue.)

Khalid Ansari’s picture

#60: taxonomy_menu.1104028-58.patch queued for re-testing.

minneapolisdan’s picture

Thanks johnv and jeff.maes, the patch from #71 worked great.

kevinquillen’s picture

Not sure if anyone noticed yet, but the _taxonomy_term_update hook is misnamed in the dev version:

function taxonomy_menu_taxonomy_menu_term_update(

Should be:

function taxonomy_menu_taxonomy_term_update(

instead, and remove the errant 'break;' statement it causes a fatal php error.

Looks like patch #71 takes that into account, though.

kevinquillen’s picture

Also, if you have 'Hide Terms' enabled, and edit an existing node and change its taxonomy category, that category will still appear in the menu despite not having any nodes assigned.

phaer’s picture

I tried to port jeff.maes version of johnvs patch (#71) to the latest dev (2012-Feb-03) and it seems to work.

awolfey’s picture

#78 works for me, although it has trailing whitespace issues, and some extra indents in the arrays. Thanks phaer for updating the patch.

PieterDC’s picture

#78 doesn't work for me.

I get this error:

PDOException: SQLSTATE[23000]: Integrity constraint violation: 1048 Column 'menu_name' cannot be null: INSERT INTO {menu_links} (menu_name, plid, link_path, hidden, external, has_children, expanded, weight, module, link_title, options, customized, updated) VALUES (:db_insert_placeholder_0, :db_insert_placeholder_1, :db_insert_placeholder_2, :db_insert_placeholder_3, :db_insert_placeholder_4, :db_insert_placeholder_5, :db_insert_placeholder_6, :db_insert_placeholder_7, :db_insert_placeholder_8, :db_insert_placeholder_9, :db_insert_placeholder_10, :db_insert_placeholder_11, :db_insert_placeholder_12); Array ( [:db_insert_placeholder_0] => [:db_insert_placeholder_1] => 0 [:db_insert_placeholder_2] => taxonomy/term/ [:db_insert_placeholder_3] => 0 [:db_insert_placeholder_4] => 0 [:db_insert_placeholder_5] => 1 [:db_insert_placeholder_6] => 1 [:db_insert_placeholder_7] => [:db_insert_placeholder_8] => taxonomy_menu [:db_insert_placeholder_9] => [:db_insert_placeholder_10] => a:2:{s:10:"attributes";a:1:{s:5:"title";N;}s:5:"alter";b:1;} [:db_insert_placeholder_11] => 1 [:db_insert_placeholder_12] => 0 ) in menu_link_save() (line 3109 of /www/includes/menu.inc).

phaer’s picture

ryandekker’s picture

Rerolled #71 against the latest dev (March 19). Works for me.

Issue in #73 is still present, I'm with johnv that thatshould be fixed later. This has some nice API changes (like _taxonomy_menu_nodeapi_helper()), we needa get this thing committed!

I did make a couple minor changes:

- I kept the Options fieldset in _taxonomy_menu_create_options().
- I moved the duplicate $args definitions in _taxonomy_menu_update_link_items() up to the top of the foreach. I think this maintains the point (redeclare each time through) while being a bit more concise.

dimitriseng’s picture

@ryandekker - #82 does not apply cleanly on the latest dev (16-Apr) so I cannot test this, are you able to reroll this against the latest dev? We can then hopefully get this commited as this is a quite important feature... Thank you!

webbykat’s picture

Re-rolled the patch from #82.

For historical records, there are a few conflicts I wasn't 100% sure about. I documented them at https://docs.google.com/spreadsheet/ccc?key=0ArxbvUL97EX9dDRaaHpvNDB3c2g.... For all 4 snippets, I went with what was in the patch (the right column), but if any bugs come back, they may be due to the removed code from the left column.

dimitriseng’s picture

@ webbykat - Thank you for rerolling this quickly against the latest dev so that it can be tested!

I have tested #84 with the latest dev and I can confirm that as far as I can see the sync is working as expected. I can also confirm that the issue described in #73 still exists, but as this is a quite important feature I suggest the following:

- Mark this RTBC based on all the positive feedback so far and hopefully some extra testing.
- Commit this asap to the dev version.
- Create a new issue to fix the problem described in #73.

@all - Can you please test #84 against the latest dev so that we can get this RTBC?
@the maintainers - Can you please review and commit when happy with this? Thank you.

Barrett’s picture

The patch in #84 included a couple, admittedly minor, style issues. This re-roll of #84 corrects those.

[edit] Once y'all have tested and approved the fix, we should be able to get it committed to dev in short order.

dimitriseng’s picture

@Barrett - I have tested the patch in #86 with the latest dev and it looks like it's working ok, same as #84. I am still getting the issue described in #73, but as mentioned above I think that we should commit this and then create a new issue for that, except if you believe that this is something easy to resolve, what do you think?

Also, I know it is a completely different issue but I thought I would ask and I hope it's ok. I have started getting the errors described in #1343768: make update_calculate_project_update_status() work nicely with HEAD releases and I think that this started after I updated to the dev version of taxonomy_menu, unless it was a different module. Does anybody get that with the latest dev? Thanks.

Barrett’s picture

Anyone else want to weigh in on this one and change the status? I'm not close enough to the issue to feel comfortable calling it fixed with only one tester.

johnv’s picture

I'm the original poster of this port. I'll test thecurrent version within the next days.

Joe Huggans’s picture

is the latest patch for the dev version or 7.x-1.2 ?

dimitriseng’s picture

The patch in #86 is against the latest dev, can you please test and confirm whether this is working or not so that we can get it in? Thanks.

farald’s picture

Status: Needs review » Reviewed & tested by the community

Ive tested the patch, and it seems to be working very well.
Bumping to RTBC. :)

Joe Huggans’s picture

Can anyone post the module file patched with #86 please?

Barrett’s picture

Status: Reviewed & tested by the community » Fixed

The latest patch has been applied and pushed up to the dev version. Thanks everyone for your work on this.

Please note that the issues in #73 are on-going but will be addressed in a separate ticket.

Joe Huggans’s picture

Thanks alot everyone who helped on this

dstol’s picture

I'm still interested in johnv's feedback.

dstol’s picture

johnv’s picture

I tested latest version, and have mistreated my taxonomy menu (adding, deleting, moving, hierarching(?) stuff). I think it works perfectly.
I have skimmed through the code, and encountered the updates - no doubt they are OK.

I cannot reproduce #1540472, but I haven't tested all other new options very thoroughly.
I am glad this got in. I'd love to learn simpletest - seems easy enough, but I'll wait for some DrupalCon demo..
RTBJ ;-)

johnv’s picture

I have made a crosslink of the #73 issue in #1426518-5: Hide taxonomy term from menu & do not re-enable after save/rebuild/sync (D7). I hope it will be well cared of over there...

johnv’s picture

Correction on #98: I DO get #1540472: Taxonomy Menu Apr 19, 2012 dev throws Warning: array_flip() [function.array-flip] after creating/updating content. But not at every time...

Status: Fixed » Closed (fixed)

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

dgastudio’s picture

sorry for opening, but with latest dev version, term created/delete works fine, but did somebody have tested ORDER?

in my case, if i move term after create in taxonomy, menu item doesnt change it's position.

dgastudio’s picture

Status: Closed (fixed) » Needs work

status

johnv’s picture

Status: Needs work » Fixed

Hi Kervi, can you open a new issue for your problem, if it still exists? This issues has been fixed too long.
A new issue will save people reading the complete solved issue again.
Perhaps your issue is part of #1485198: Menu_links properties (parent plid, hidden, weight) not saved after node creation/update/deletion (in _taxonomy_menu_save() )

pindaman’s picture

I am using term hierargie module to create my vocabularie parent child items.
http://drupal.org/node/1204512

Taxonomy menu works great BUT....
Synchronise changes to this vocabulary creates errors when node is being created.

PDOException: SQLSTATE[23000]: Integrity constraint violation: 1048 Column 'weight' cannot be null: UPDATE {menu_links} SET menu_name=:db_update_placeholder_0, plid=:db_update_placeholder_1, link_path=:db_update_placeholder_2, router_path=:db_update_placeholder_3, hidden=:db_update_placeholder_4, external=:db_update_placeholder_5, has_children=:db_update_placeholder_6, expanded=:db_update_placeholder_7, weight=:db_update_placeholder_8, depth=:db_update_placeholder_9, p1=:db_update_placeholder_10, p2=:db_update_placeholder_11, p3=:db_update_placeholder_12, p4=:db_update_placeholder_13, p5=:db_update_placeholder_14, p6=:db_update_placeholder_15, p7=:db_update_placeholder_16, p8=:db_update_placeholder_17, p9=:db_update_placeholder_18, module=:db_update_placeholder_19, link_title=:db_update_placeholder_20, options=:db_update_placeholder_21, customized=:db_update_placeholder_22 WHERE (mlid = :db_condition_placeholder_0) ; Array ( [:db_update_placeholder_0] => menu-categorieen [:db_update_placeholder_1] => 2515 [:db_update_placeholder_2] => taxonomy/term/1521 [:db_update_placeholder_3] => taxonomy/term/% [:db_update_placeholder_4] => 0 [:db_update_placeholder_5] => 0 [:db_update_placeholder_6] => 0 [:db_update_placeholder_7] => 1 [:db_update_placeholder_8] => [:db_update_placeholder_9] => 2 [:db_update_placeholder_10] => 2515 [:db_update_placeholder_11] => 2514 [:db_update_placeholder_12] => 0 [:db_update_placeholder_13] => 0 [:db_update_placeholder_14] => 0 [:db_update_placeholder_15] => 0 [:db_update_placeholder_16] => 0 [:db_update_placeholder_17] => 0 [:db_update_placeholder_18] => 0 [:db_update_placeholder_19] => taxonomy_menu [:db_update_placeholder_20] => omartestchild [:db_update_placeholder_21] => a:2:{s:10:"attributes";a:1:{s:5:"title";s:13:"omartestchild";}s:5:"alter";b:1;} [:db_update_placeholder_22] => 0 [:db_condition_placeholder_0] => 2514 ) in menu_link_save() (line 3183 of /includes/menu.inc).

Status: Fixed » Closed (fixed)
Issue tags: -hierachy, -synchronization

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