Drupal 7.14
Open Wall Linux
Drush 5.1

Was using menu_token-7.x-1.0-alpha2 (possibly an earlier version). Upgraded to menu_token-7.x-1.0-beta3. Performed drush updatedb. An update was listed to remove deprecated menu_token table which I accepted. Site requests following update crash with 500 Internal Server Error. Tried disabling module via Drush which failed with "Segmentation Fault" error and is the result of any further Drush commands.

Manually setting module status in database to 0 in system table and truncating cache tabless brought site back up. Re-enabling the module triggers the broken website state again requiring one to go back through this manual process to bring the site back up again.

Cycled through various versions of the module and the only version which does NOT end in this result upon being enabled is menu_token-7.x-1.0-alpha2.

During these tests, it appeared that not all cache tables needed to be truncated. Possibly only cache_bootstrap.

The exact wording of the Drush error:
/usr/local/bin/drush: line 13: XXXX Segmentation fault drush "$@"

where XXXX was a different 4-5 digit number every time, usually higher by some indeterminate number than in the previous error output.

All prior menu items that were using menu_token now point to front. However, this may have been due to an earlier attempt to uninstall menu_token-7.x-1.0-beta3 entirely from system before the cache clearing solution was employed.

Comments

digitalfrontiersmedia’s picture

Status: Needs work » Active

After getting everything working again, I found that editing a menu item and enabling it to use menu tokens and adding a value of user/[current-user:uid]/edit produced a menu link still leading to front. Cleared caches and back comes the 500 Error. Error reporting is on and this appears to be different than #1871988: PHP Fatal error: Call to undefined function entity_load_single() since Entity API module is installed and enabled (entity-7.x-1.0-rc3) but possibly related to #1205086: Editing a menu item with tokens in link crashes the server?

digitalfrontiersmedia’s picture

Issue summary: View changes

Clarified reaction when module was re-enabled.

develcuy’s picture

Status: Active » Needs work

Thanks for the report. Can you try with dev version of Menu Token?

digitalfrontiersmedia’s picture

Tried that first. No go. Having a hard time trying to figure out what could be wrong here. What other info might be useful?

develcuy’s picture

Status: Active » Needs work

I meant, now that you got Menu Token almost working try dev version again.

digitalfrontiersmedia’s picture

Ah, you mean upgrade from alpha2 directly to -dev? Okay, will give that a go after I have caught up (this kind of threw me for a loop). Then will report back here.

digitalfrontiersmedia’s picture

Component: Code » Miscellaneous
Category: bug » support
Status: Needs work » Active

No good. Tried Me Aliases module and got the same thing. It appears that any module trying to monkey with menus and tokens kills the site.

Switching this to Support instead of bug report in anticipation of someone lending assistance as to what could be causing such a problem. I don't think it's necessarily a problem in the Menu Token code per se anymore.

Thanks. Let me know if you or anyone else has suggestions.

Cheers,
Stephen

alberthendriks2’s picture

Segmentation faults are not normal. In PHP it might happen on some OS's (POSIX) when making an infinite recursion call. That would also explain some of the memory size issues.

I've taken a quick look into the code. The Drupal core uses variables for function names and calls those functions when translating menu items. My guess would be that menu_token_translated_menu_link_alter() calls itself recursively in an infinite way by calling menu_get_item(). You cannot solve this by switching OS. You might check if this error still happens when you turn off locale.

digitalfrontiersmedia’s picture

Many thanks for the suggestions. Will take a look this coming week.

digitalfrontiersmedia’s picture

Status: Active » Closed (works as designed)

Closing this. I concur with alberthendriks2's thoughts. Rebuilding the menu router tables seems to clear it up until the condition in my bad code sets it off again. Many thanks for the suggestions and help.

digitalfrontiersmedia’s picture

Issue summary: View changes

fixing reference to that was getting caught up in input filter.

Katrina B’s picture

Version: 7.x-1.x-dev » 7.x-1.0-beta5
Issue summary: View changes
Status: Closed (works as designed) » Active

I have tried the latest "recommended" version and the latest dev version -- both for Drupal 7. Both give me "memory exhausted" errors. I cannot use either version.

develcuy’s picture

Status: Active » Closed (outdated)