I have to say, I love this module. I've been using it for a while now and everything has worked very well. However, I noticed today that whenever I go to create a new node by entering a title that doesn't exist in the address bar, it takes me to the node creation as usual and everything looks and works as it should, However, I get the following warning at the top of the page.

* warning: Invalid argument supplied for foreach() in C:\xampp\htdocs\drupal\includes\common.inc on line 874.
* warning: strtr() [function.strtr]: The second argument is not an array in C:\xampp\htdocs\drupal\includes\common.inc on line 891.
* warning: Invalid argument supplied for foreach() in C:\xampp\htdocs\drupal\includes\common.inc on line 874.
* warning: strtr() [function.strtr]: The second argument is not an array in C:\xampp\htdocs\drupal\includes\common.inc on line 891.

I have no idea when this started happening or why. Don't know if it's a bug related to Wikitools, however, I assume so. Any help would be greatly appreciated.

CommentFileSizeAuthor
#5 wikitools-t-error.patch1.59 KBcridenour
Support from Acquia helps fund testing for Drupal Acquia logo

Comments

noymen’s picture

I have the similar warning after upgrade to version 6.1.1

roryrawlings’s picture

I have this running on a production site and just commented out lines 874 thru 891 of common.inc for the time being and it got rid of the error. I haven't experienced any other bad behavior since doing so.

timbomb’s picture

I seem to have the same issue. I'm a bit reluctant to comment out bits of common.inc.

warning: Invalid argument supplied for foreach() in /home/johaeorg/public_html/intranet/includes/common.inc on line 874.
warning: strtr() [function.strtr]: The second argument is not an array in /home/johaeorg/public_html/intranet/includes/common.inc on line 891.
warning: Invalid argument supplied for foreach() in /home/johaeorg/public_html/intranet/includes/common.inc on line 874.
warning: strtr() [function.strtr]: The second argument is not an array in /home/johaeorg/public_html/intranet/includes/common.inc on line 891.

cridenour’s picture

Also seeing this error. Will look into further.

cridenour’s picture

Assigned: Unassigned » cridenour
Status: Active » Fixed
FileSize
1.59 KB

See attached patch.

Problem: Misuse of t(). Misused variable names inside t.

All fixed in wikitools.pages.inc which was causing this problem.

roryrawlings’s picture

It works! Thanks so much!

ramereth’s picture

I've applied the patch and I'm still getting the error. Is there something else I need to do? Thanks!

ramereth’s picture

Never mind, it was a goof on my part. Had a wikitools.old folder when I did the upgrade and forgot to remove it. Sorry for the noise!

Anonymous’s picture

Status: Fixed » Active

I'm wondering why the %variable was used versus @variable in the patch? A title needs a check_plain not run through theme_placeholder. Or am I wrong about this?

Anonymous’s picture

Any answer to my question in #9?

cridenour’s picture

I was following convention of the rest of the module. I'll look into it more this weekend.

GregoryHeller’s picture

Figured i'd also confirm that this patch appears to be working for me as well.

cwgordon7’s picture

Status: Active » Fixed

This change has long been applied to the development branch (with % not @).

Status: Fixed » Closed (fixed)

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