I am logging to issue to make it easy for people to search for this problem, which is effectively a rare combination of modules (I guess).

If you get

Call to undefined function "purl_item_edit_validate"

this is a conflict with http://drupal.org/project/menu_views

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

benjaminkyta’s picture

Hello. Am having the exact same error with "menu_token"

Could you be knowing how to go about with it?

Thanks

sime’s picture

We are in the position where we don't need purl's menu configuration options, and we are now maintaining a patch against purl that prevents it from altering the menu forms. If you look in purl.module you will see that I've modified the function below by adding return;

/**
 * Implements hook_form_alter().
 */
function purl_form_alter(&$form, &$form_state, $form_id) {

  // HACK
  // SH: Deactivated this feature because it conflicts with menu_views
  //     and we don't need it. I do not know how to fix this problem,
  //     it looks complex.
  return;

  switch ($form_id) {
  ...
  ...
  ...

}

batje’s picture

Status: Active » Needs review
FileSize
1.18 KB

it was more difficult than that. Attached is a patch

batje’s picture

FileSize
2.13 KB

this patch also has the changes to purl.admin.inc and

batje’s picture

FileSize
2.13 KB

was passing arguments as reference which was causing very funky behaviour.

sime’s picture

Oh nice @batje! I will try and test this next week.

sime’s picture

Is working for me (applied patch by hand tho) and the only issue I see is:

Notice: Undefined index: menu_name in _purl_item_edit_submit()

Yuri’s picture

Yes, after applying the patch the error mentioned above in #7 appears, which refers to
line 353 of /home/testsite/public_html/sites/all/modules/purl/purl.admin.inc
which is:

menu_cache_clear($form_state['values']['menu_name']);

@batje: can you have a look plz

SocialNicheGuru’s picture

menu_name is probably not defined in the $form_stat['values']
should there be a check to see it is exists before it is called?

jramby’s picture

Maybe just by changing the :

<?php
function _purl_item_edit_submit($form, &$form_state) {
  menu_cache_clear($form_state['values']['menu_name']);
}
?>

to :

<?php
function _purl_item_edit_submit($form, &$form_state) {
  if (!isset($form_state['values']['menu_name'])){
    menu_cache_clear($form_state['values']['menu_views']['name']);
  }else{
    menu_cache_clear($form_state['values']['menu_name']);
  }
}
?>

I'm not sure of my proposition, this function is not documented yet. And I think it just removes the symptom but not the source :-|

rickmanelius’s picture

Status: Needs review » Reviewed & tested by the community

I understand the concerns stated in #10 (not sure of symptom/source), however the patch in #5 at least gets us to the point of this functioning.

Marking RBTC and seeing if the maintainer wants to weigh in or just commit and spin off the remaining concerns into another ticket.

Gyver06’s picture

Applying the patch in #5 solved my problem.
Why don't you include this patch in the last dev version ?

sigveio’s picture

Priority: Minor » Major

Purl also seem to conflict with Token menu, ref. #1528442: Call to undefined function purl_item_edit_validate().

The patch in comment #5 fixes it.

It would be appreciated if the maintainer could include the patch in the latest dev version and/or a new release, so that people do not have to spend unnecessary time trying to work out what's gone wrong when things do not function properly.

(Bumping priority to Major, as this issue renders the entire functionality surrounding adding new menu entires non-functional when one of the conflicting modules are used. That should be a concern large enough to see some priority when there's been a working patch available since April of last year. :))

tom friedhof’s picture

Issue summary: View changes

The patch in comment #5 fixes this error when using menuimage module as well.

drclaw’s picture

FileSize
2.46 KB

I also was having an issue with the redirect module's form_alter. To be honest, I'm using purl on a few sites with the redirect module and only one of them has this issue. I want to debug this one a little more, but don't have the time so it's Band-aid for now!

hatsch’s picture

the patch in comment #5 seems to fix the error that come with menu_token #1528442: Call to undefined function purl_item_edit_validate()

recrit’s picture

Status: Reviewed & tested by the community » Needs review
FileSize
2.99 KB
883 bytes

The patch in #15 created duplicate function declarations for purl_redirect_edit_validate. The attached patch #17 updates the admin.inc function to "_purl_redirect_edit_validate".

pianomansam’s picture

Status: Needs review » Reviewed & tested by the community

This patch appears to be working for me. I think it's time to be RTBC.