When I click a comments title, I got below error.

Recoverable fatal error: Argument 1 passed to drupal_http_build_query() must be an array, string given, called in C:\wamp\www\drupal7\includes\common.inc on line 2119 and defined in drupal_http_build_query() (line 469 of C:\wamp\www\drupal7\includes\common.inc).

Comments

Dilemma21’s picture

Priority: Normal » Major
andypost’s picture

Can't confirm this bug. Please, provide a steps to reproduce

Dilemma21’s picture

I dont know reason why I got this error or steps

damien tournoud’s picture

Status: Active » Closed (cannot reproduce)
Dilemma21’s picture

Status: Closed (cannot reproduce) » Active

FieldException: Attempt to create an instance of field comment_body on bundle comment_node_article that already has an instance of that field. in field_create_instance() (line 674 of C:\wamp\www\drupal7\modules\field\field.crud.inc).

When I disable and enable the comment module, I got this error

coderintherye’s picture

I've gotten this same error, when attempting to use search. Not sure of the cause or how to reproduce unfortunately. I do know that I deleted an unpublished test comment shortly before this error started occuring. I had also installed and uninstalled the friendconnect module.

The good news is, there is a temporary workaround. Change line 2118 of includes/common.inc from:

if ($options['query']) {

to instead be:

if ($options['query'] && is_array($options['query'])) {

I doubt that is the best long-term fix so not making it a patch, but I'm not sure I understand where the query is coming from without a proper backtrace at the moment, so can't debug it much past this point.

coderintherye’s picture

Title: Single comment shown bug » Argument 1 passed to drupal_http_build_query() must be an array, string given in common.inc
Component: comment.module » base system
Priority: Major » Normal

Changing title to better reflect problem. I don't think this is necessarily delegated solely to the comment system, cause it is coming from the query portion sent as option to drupal_http_build_query(), most likely from url().

Also changing priority to normal until we can find a path for reproducing this bug.

Also, @5 Unless I am mistaken, yours is a different issue and you should file a new issue report for it.

xjm’s picture

Marked #1339424: D6 -> D7 upgrade unusable to do broken menu item as duplicate. There's some steps to reproduce in that issue.

Martin.Schwenke’s picture

As per #1339424: D6 -> D7 upgrade unusable to do broken menu item, the trigger for the bug was a menu item that didn't get updated from a string to an array by the D6 -> D7 upgrade process.

If other people can confirm that a menu item caused this issue when they saw it, then perhaps this bug should be should be marked as being part of the menu system or menu.module? Given that the site becomes unusable when this happens then I would argue that the priority should be lifted to "major". I had to delete the menu item by hand in MySQL to make it work... although I could have added the workaround in comment #6 to more places, I guess...

fndtn357’s picture

Version: 7.0-alpha6 » 7.9

I am having this issue - after upgrading from version 6.22 to version 7.9 - when trying to open the link for editing the main menu links.

Recoverable fatal error: Argument 1 passed to drupal_http_build_query() must be an array, string given, called in ../includes/common.inc on line 2161 and defined in drupal_http_build_query() (line 472 of ../includes/common.inc).

So far, I do not see this error in other pages I have tried to view yet!

I also see a link for PHP Cross Reference and wonder how best to use this resource to solve my problem.

Any tips would be appreciated.

luksak’s picture

Version: 7.9 » 7.x-dev

I am getting this error when trying to enable a theme. I disabled Mobile Tools which I enabled just before and the issue was resolved. Are you using Mobile Tools as well?

fndtn357’s picture

No, I am not using Mobile Tools on this site. But maybe your comment about theme has some merit for me to dig around a bit more in that direction. The other thought I had was it was related to a View somehow.

mohan.kumar’s picture

ya you are correct.

Status: Active » Closed (outdated)

Automatically closed because Drupal 7 security and bugfix support has ended as of 5 January 2025. If the issue verifiably applies to later versions, please reopen with details and update the version.