Hello, Any plan for Drupal 7 version. Looking forward for it.

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

Johnny vd Laar’s picture

There is currently no work on the D7 version. We just released a 6.x-2.0 version so if anyone is interested to port automenu then we'd appreciate it that you focus on this version.

Jean Gionet’s picture

would love to see a D7 port! I'm looking for a solution to work with the Workbench module!

ipwa’s picture

As a workaround for now, I just realized you could use:

http://drupal.org/project/nat + http://drupal.org/project/taxonomy_menu

dreizwo’s picture

Status: Active » Needs review
Issue tags: +Drupal 6 -> Drupal 7 upgrade
FileSize
2.27 KB

Here's a first version for automenu and D7. It only supports menu-link creation for nodes. Untestet, but works for me.

rogical’s picture

just follow #3 's suggestion, I thought that's too complicated,

some may just want to automatically specify the parent menu and add a menu on node creation,

this module would be the just right one.

rogical’s picture

FileSize
84.91 KB

#4 your package seems doen't work for me, my drupal is 7.2

Notice: Undefined index: plid 在 automenu_automenu_create() (行 122 在 /opt/difang/dev/pjkaixin/sites....

PDOException: SQLSTATE[HY000]: General error: 1366 Incorrect integer value: '' for column 'expanded' at r.....

More details are attached.

dreizwo’s picture

FileSize
5.01 KB

#6 You're right!
Here's a new completly redesigned version of automenu. It includes some new features and bugfixes:
>You can enable/disable automenu per contenttype.
>You can hide messsage
>You can ignore the status (published or not) of the child
>Contains classes to create automenu-links programmatically inside of other modules (@see sourcecode class.AutomenuCreateLinkDefaultImpl.php)
>Bugfix: uses the menu of menu-settings

Give it a try - and let me know if it's working now..

rogical’s picture

It seems working fine, Thanks!

Currently get one notice when anonymous posting:

Notice: Undefined property: stdClass::$name on Automenu->initialize() (row 44 in /opt/difang/dev/pjkaixin/sites/all/modules/automenu/class.Automenu.php).

dreizwo’s picture

FileSize
5.04 KB

#8 Should work now - but untested....

if(user_is_logged_in())
    $this->description = t('created by @user on @date',
                                 array('@user' => $user->name, '@date' => date('l', $this->child->created)));
 else
    $this->description = t('created by anonymous user on @date',
                                           array('@date' => date('l', $this->child->created)));

check for anonmyous user added

let me know....

Geex2011’s picture

hey guys, i installed the port and it seems working fine so far ... but I have question, why does it append a "node/" to the node title?? is there a an important reason for it ??? if not, how can i remove it??

I really find this module very helpful and appreciate you time and efforts, thanks.

otx’s picture

dreizwo, thanks for the D7 port, great job! I just installed the module and it seems to work fine for me. But as described in #10, it adds undesired "node/" string in front of newly created menu title. Probably just copy paste problem in class.Automenu.php, I believe that changing

  $this->linktitle =  'node/' . $this->child->title;

into

  $this->linktitle = $this->child->title;

fixes the problem :)

dreizwo’s picture

FileSize
5.05 KB

#11 otx - thank you for the hint!
as described... here's the new version...

marcusx’s picture

Is the taxonomy functionality in the port? #692360: Automenu with taxonomy integration I assume not, or am I to blind to find it?

Thanks!
Marcus

dreizwo’s picture

#13 dear marcus!
sorry, but there's still no plan to integrate taxonomy

dreizwo’s picture

FileSize
63.47 KB

new version of automenu
needed for the sandbox project cttree see : http://drupal.org/sandbox/dreizwo/1209134

dreizwo’s picture

FileSize
6.61 KB

#15 I'm dreadfully sorry.
this is of course wrong here's the right version
@admin | @community how to delete the attachment of #15??

Johnny vd Laar’s picture

i'm sorry for the lack of attention but i've broken my leg so didn't look much on d.o

I've mailed you back about further steps.

camdarley’s picture

Subscribe, and waiting for taxonomy integration. Thanks for your job.

Johnny vd Laar’s picture

Does anyone know how to make someone a co-maintainer? Don't know if I can do this as I'm not the main maintainer.

corneverbruggen’s picture

Hi,

yes, I know how to - currently I still am the main maintainer, but (as you have noticed) am not active in this project anymore.

@Johnny vd Laar: are you willing to be the main maintainer? If so, I will request a transfer of project ownership.

Johnny vd Laar’s picture

well we don't use the module anymore as drupal 7 more or less fixes the issues for which we used auto menu. but perhaps dreizwo is interested?

rogical’s picture

@dreizwo, hope you could take the role of D7 branch maintainer.

13rac1’s picture

Status: Needs review » Needs work

#16 looks ok, but needs work. It doesn't follow the Drupal coding standards, and seems to re-invent some standard Drupal functionality. Can you tell me why it is class based? It seems like it requires significantly more code to be class based. The menuing system between D6 and D7 hasn't changed too much, a complete direct port (like #4) would probably be better.

matiki’s picture

subscribing

wojtha’s picture

Hello there, after initial trial to port this module to D7 I decided to start from scratch.

The code is now in my sandbox called "NodeAutoMenu" which is basically something like AutoMenu - The Next Generation.

lscalado’s picture

If someone try checkout NodeAutoMenu, try using this command:

git clone --branch 7.x-1.x http://git.drupal.org/sandbox/wojtha/1331132.git nodeautomenu

Johnny vd Laar’s picture

Isn't it a better idea to merge the two modules and that you take over this module as maintainer?

wojtha’s picture

@Johnny vd Laar ok, if you like it :-) But the sandbox is still just an experiment, I want to reconsider couple of things.

P.S. AutoMenu - The Next Generation name doesn't neccesarilly mean that I wanted to create new project, that just means that it is rewritten from scratch.

rogical’s picture

I think it's time to open a D7 branch, and maybe can consider Dealing with abandoned projects.

ipwa’s picture

Hi @rogical, @Johnny vd Laar seems to be the current maintainer, and although he hasn't committed code in a while he's actively involved in this issue for example, so I don't think I'd classify this project as abandoned. He has also invited @wojtha to be a co-maintainer, so all he needs to do is add him in the maintainers tabs.

Johnny vd Laar’s picture

I'm not the main maintener so I don't think I can add people to the project. @corneverbruggen is the main maintainer so he can add people. I think it would be best if someone takes over the main maintainership but that's up to corne to decide I think.

I've committed code in the past but I'm not using the module myself anymore so I won't do any coding on it anymore.

ipwa’s picture

Even as a co-maintainer you can add maintainer if you have enough permissions to do so. Ask @corneverbruggen to give you those permissions, or for him to add @wojtha himself.

Johnny vd Laar’s picture

I don't see the page to add maintainers so I guess I don't have sufficient permissions. @wojtha can you contact @corneverbruggen to get maintainer access?

fretje’s picture

@wojtha: I installed your module from the sandbox, but I have a problem with the taxonomy mapper. I have my content type linked to a menu which already contains a hierarchy of links to the taxonomy terms. When I check the "basic taxonomy mapper", no menu items get created. When I choose "default parent", they get created, but of course in the "root" of the menu. How exactly is this taxonomy mapper supposed to work? Am I missing something?

Also when using "default parent": When I replace a generated menu item inside the menu (so it's actually underneath the taxonomy term it belongs to) then it gets re-created in the root when the node gets saved. Wouldn't it be interesting to check on that, and only change the title/description of the menu-item, instead if re-placing it?

wojtha’s picture

@fretje taxonomy mapper is very fragile now, it doesnt know how to create the taxonomy menu items by itself, so you need to create the needed menu structure itself - e.g. using http://drupal.org/project/taxonomy_menu_form

fretje’s picture

@wojtha that's exactly what I did... I did use http://drupal.org/project/taxonomy_menu though, but no menu-items get created...

fretje’s picture

I found the problem... Apparently it was a typo in the settings string for the 'nodeautomenu_vocabulary' setting.
I had to change the string 'autonodemenu_vocabulary_' to 'nodeautomenu_vocabulary_' 2 times in the nam_taxonomy.module file.

Now the menu items get created, but I bump into another problem after adding 5 menu-items this way, when I want to add the 6th one (it doesn't matter if the 5 previous ones are under the same taxonomy term, or different ones), I always get this warning:

'Node auto menu link can't be created because 2 ancestor menu items are missing: mycategory1 > mycategory2. Create these items first and try to save this node again.'

But the 2 categories mentioned do actually exist.

When I remove a menu-item, I can add another one. Any ideas?

fretje’s picture

Okay, I figured it out... sort of. Not sure of all my changes, but here's what I did:

In the 'nodeautomenu_subtree_data' function, I made sure the query was always ordered, by taking the orderBy statement out of the 'if ($link)' clause:

      if ($link) {
        for ($i = 1; $i <= MENU_MAX_DEPTH && $link["p$i"]; ++$i) {
          $query->condition("p$i", $link["p$i"]);
        }
      }
      for ($i = 1; $i <= MENU_MAX_DEPTH; ++$i) {
        $query->orderBy("p$i");
      }

and in the 'nodeautomenu_search_menu_parent' function, I only extract the 'below' array out of the fist node of $sub_tree when $plid is not 0 (as apparently that's not needed in that case):

  $sub_tree = nodeautomenu_subtree_data($menu_name, $plid);

  if ($plid != 0) {
    $sub_tree = reset($sub_tree);
    $sub_tree = $sub_tree['below'];
  }

I'm not really sure though if this is actually needed when $plid is not 0, as that's never the case in my case.

But anyways, with these changes, everything seems to work 'as advertised' ;-)

Yuri’s picture

Is this good enough for a dev version?

office@w3k.at’s picture

How about this D7 module:
http://drupal.org/project/menu_position

bmcclure’s picture

Menu Position does not solve the same issue. Menu position 'feigns' an item being in the menu, but it doesn't actually add any nodes to the menu. The rules you create are added to the menu, and if the page you're on matches one of those rules, then the page you're on shows up in the menu where that rule is.

We still need a good way to sync up nodes with menu items automatically based on some sort of rule structure.

webadpro’s picture

Any update on this?

webadpro’s picture

There seems to be missing a js file also.

Line 54 automenu.module:

'automenu' => drupal_get_path('module', 'automenu') . '/automenu.js',

webadpro’s picture

any update guys?

Kristen Pol’s picture

Assigned: webs.com.mt » Unassigned
Category: task » feature
Status: Needs review » Needs work

I tried NodeAutoMenu from #25 and get:

    Notice: Undefined index: menu in nodeautomenu_node_submit() (line 121 of /var/www/docroot/drupal/sites/all/modules/contrib/nodeautomenu/nodeautomenu.module).
    Recoverable fatal error: Argument 2 passed to drupal_array_set_nested_value() must be an array, null given, called in /var/www/docroot/drupal/includes/form.inc on line 2514 and defined in drupal_array_set_nested_value() (line 6440 of /var/www/docroot/drupal/includes/common.inc).

:/

webs.com.mt’s picture

Assigned: Unassigned » webs.com.mt
Category: feature » task
Status: Needs work » Needs review
FileSize
2.11 KB

I have downloaded the module provided in #4 and made some changes as it was not working for me. I am attaching the modified code.

This is working on Drupal 7.14.

elgandoz’s picture

#46 worked perfectly for me (7.22). Is it possible to commit as 7.x release?

windmaomao’s picture

Assigned: Unassigned » webs.com.mt
Category: feature » task
Status: Needs work » Needs review

this module works great, I have a request, the menu entry URL might not be the node link, instead, I want to have sort of pattern, ex. node/%/display, or xxxx/. I guess i can dig in and add that.

GaëlG’s picture

Status: Needs review » Reviewed & tested by the community

#25 works great for me. #46 did not (duplicates on node updates). #25 is more advanced and the code seems cleaner. This should definitely be the D7 dev version. It would ease downloading, debugging and contributing.

+1 for wojtha as a new maintainer

botris’s picture

+1 for #25, works great

Andrew Gorokhovets’s picture

+1 for #25, works great
But only nodeautomenu.module
In nam_taxonomy.module settings is not saved on the content type edit page.

rooby’s picture

Issue summary: View changes

+1 for #49 if wojtha is still interested.

ajwn’s picture

#46 works here on 7.31 thanks for the contribution.