menu_link_save doesn't like aliases (drupal)

Comments

2 comments posted
Added to DrupalSightings.com
Jim's picture
Posted by Jim (not verified) on Thu, 03/12/2009 - 12:52pm
A quick tip.. while working

A quick tip.. while working on an install profile in Drupal I discovered that the menu_link_save() function requires an internal URL, e.g. "node/123" instead of "my-cool-page". Once I tracked down the issue I was able to very easily create lots of menu items as needed, but it wasn't entirely obvious this was needed. I was using install_profile_api to create the menu items and figured it was going to make things easier for the end user, but alas no, so I threw together a quick patch to save others the headache, and wasted hours of development time.micheal

Anonymous's picture
Posted by Anonymous (not verified) on Sat, 04/09/2011 - 4:22am

Post new comment

The content of this field is kept private and will not be shown publicly. If you have a Gravatar account associated with the e-mail address you provide, it will be used to display your avatar.
  • Web page addresses and e-mail addresses turn into links automatically.
  • Allowed HTML tags: <em> <strong> <cite> <code> <ul> <ol> <li> <dl> <dt> <dd>
  • Lines and paragraphs break automatically.
  • Potential spoilers can be hidden between [spoiler][/spoiler] tags to hide them by default.

More information about formatting options

CAPTCHA
Fill in the two words you see below - it's case sensitive so uppercase letters are different to lowercase letters. Apologies for this inconvenience but my site has been bombarded by spammers lately.
 
flyingmonkey