First of all, I love this module but I cannot seem to get the block to work correctly. I believe that it is something wrong with the code. When I add the bookmarks block to my drupal site and then use the 'quick link' link to add a bookmark to my block I get the following errors:

warning: array_merge() [function.array-merge]: Argument #1 is not an array in ./includes/menu.inc on line 352.

warning: Cannot modify header information - headers already sent by (output started at ./includes/common.inc:384) in ./includes/common.inc on line 192.

These errors cause my page just to show a blank page with just the errors. The link does eventually get added though to the block...

The first one is printed out because the following is not set: $menu['items'][$mid]['callback arguments'] in ./includes/menu.inc. The second I found that this bit of code causes it on line 173ish in bookmarks.module:

drupal_goto("bookmarks/$user->uid");

If I comment out that line, then I can at least see my site after I add a quick link. Not entirely sure what it does though.

Please fix these errors so I can use this module. It is exactly what I need.

Thanks,
Mark

CommentFileSizeAuthor
#1 bookmarks_0.module10.08 KBwatermark

Comments

watermark’s picture

StatusFileSize
new10.08 KB

Whelp, it took forever because I have never worked with drupal's api before now, but I got my problems solved. I don't want to go through much details so here is a diff of the attached file and the original bookmarks.module.

Cheers,
Mark

47c47
< 
---
>   
50,51c50,51
<                     'callback' => 'bookmarks_page', 'access' => $access, type=>MENU_CALLBACK);
< 
---
>                     'callback' => 'bookmarks_page', 'access' => $access);
>                     
127c127
<   $query = 'url=' . urlencode($url). '&block=1';
---
>   $query = 'url=' . urlencode($url). '&amp;block=1';
173c173
<         drupal_goto();
---
>         drupal_goto("bookmarks/$user->uid");
206d205
<   $group .= form_hidden('destination', $edit['url']);
336c335
< ?>
\ No newline at end of file
---
> ?>
Steve Simms’s picture

Status: Active » Closed (fixed)

I'm pretty sure this has gotten fixed somewhere along the line -- I'm not seeing the problem, in any case. If you still are in Drupal 4.7, please reopen.