Hello!
I have "Notice: Undefined index: page_id in boost_expire_node()" in boost.module file
Besides a lot of other notices in this module I was confused with this

$GLOBALS['_boost_router_item'] = isset($GLOBALS['_boost_router_item']) ? $GLOBALS['_boost_router_item'] : _boost_get_menu_router();
$router_item = $GLOBALS['_boost_router_item'];

after that $router_item['page_id'] is used without any conditions for isset, so I assume function _boost_get_menu_router() should always return array with index 'page_id', but it's not

take a look on my menu item in hook_menu


  $items['user/profile'] = array(
    'title' => 'mymenuitemtitle',
    'page callback' => 'mypagecallback',
    'access arguments' => array('has account'),
    'type' => MENU_CALLBACK,
    'weight' => -49,
    'file' => 'mymodule.pages.inc',
  );

so in function _boost_get_menu_router() menu_get_item called at the beginning
and after 'page_id' added in following cases:

  • this is node page
  • this is taxonomy page
  • this is user page
  • this is view page
  • this is panel

in other cases there won't any "page_id" in array

I made patch from netbeans in attachments. It doesn't contains path to file, so you should use it directly

CommentFileSizeAuthor
boost-module-boost-expire-node.patch801 byteschingis

Comments

chingis’s picture

btw, I did some fixes in module before to get rid of notices, so patch probably won't apply to you
but it's pretty simple and you can make it by your own

chingis’s picture

btw, I have one more notice in function boost_put_db
Notice: Undefined index: page_id in boost_put_db()
Well, reason is similar, router_item won't have "page_id" according to _boost_get_menu_router if its not:
node page
taxonomy page
user page
views page
panel page

But probably that's my misunderstanding of how module works.
Waiting for your feedback, thanks!