wrong parameters for url() inside insert_block_help()

Pasqualle - December 22, 2008 - 12:44
Project:Insert Block
Version:6.x-1.x-dev
Component:Code
Category:bug report
Priority:critical
Assigned:Unassigned
Status:closed
Description

The insert block help makes a fatal error:
Fatal error: Unsupported operand types in includes\common.inc on line 1275

the problem is that the url() function in the insert_block_help() hook uses D5 parameters.

insert_block.module line 41

      return t('<p>Inserts the contents of a block into into a node using [block:module=delta] tags.</p><p>You may use <a href="@insert_block_help">[block:<em>module</em>=<em>delta</em>] tags</a> to display the contents of block <em>delta</em> for module <em>module</em>.</p>', array("@insert_block_help" => url("filter/tips/$format", NULL, 'filter-insert_block')));

should be changed to

      return '<p>'. t('Inserts block content into a node using [block:module=delta] tags.') .'</p>';

#1

basicmagic.net - January 4, 2009 - 17:15

hi and thanks for a great module-

i saw this, too... when i tried to go to:
http://yourdrupalsite.com/admin/help

it triggered this error:
Unsupported operand types in html/drupal/includes/common.inc on line 1369

however-
i fixed it using the code, below.

please review and see if it works / is ok!

before (broken):

return t('<p>Inserts the contents of a block into into a node using [block:module=delta] tags.</p><p>You may use <a href="@insert_block_help">[block:<em>module</em>=<em>delta</em>] tags</a> to display the contents of block <em>delta</em> for module <em>module</em>.</p>', array("@insert_block_help" => url("filter/tips/$format", NULL, 'filter-insert_block')));

after (working):

return t('<p>Inserts the contents of a block into into a node using [block:module=delta] tags.</p><p>You may use <a href="@insert_block_help">[block:<em>module</em>=<em>delta</em>] tags</a> to display the contents of block <em>delta</em> for module <em>module</em>.</p>', array("@insert_block_help" => url("filter/tips/$format", array('query' => NULL, 'fragment' => 'filter-insert_block'))));

#2

mlsamuelson - January 8, 2009 - 16:50
Status:needs review» fixed

Thanks for tracking this down. I've corrected for the issue and cleaned up the filter tips and help page text while I was at it.

The updates are in both HEAD and the 6-1.x branch.

Much appreciated.

mlsamuelson

#3

System Message - January 22, 2009 - 17:00
Status:fixed» closed

Automatically closed -- issue fixed for two weeks with no activity.

 
 

Drupal is a registered trademark of Dries Buytaert.