I get the following error when I visit tracker/'uid'

website is www.itsourcecan.com
must create an account to view tracker/

# warning: array_key_exists() [function.array-key-exists]: The first argument should be either a string or an integer in /var/www/itsourcecan.com/sites/all/modules/views/includes/view.inc on line 1245.
# warning: mysql_real_escape_string() expects parameter 1 to be string, object given in /var/www/itsourcecan.com/includes/database.mysql.inc on line 321.
# warning: Illegal offset type in /var/www/itsourcecan.com/sites/all/modules/views/includes/view.inc on line 1249.
# warning: Illegal offset type in /var/www/itsourcecan.com/sites/all/modules/views/includes/view.inc on line 1284.
# warning: Illegal offset type in isset or empty in /var/www/itsourcecan.com/sites/all/modules/views/views.module on line 699

Comments

vm’s picture

Component: forms system » other
Status: Active » Fixed

upgrade core to the latest release and ensure you are using tghe latest release of the views.module

I'd also take the time to inspect the views to ensure there are no problems.

This question is better served in the forums and is a views issue based on the warnings. Are you using a view for your tracker?

ja1d3n’s picture

Thanks for the reply.

I dont use view for the tracker which is kind of weird, and views is up-to-date.

I had Organic Groups installed before and I uninstalled it. After that I started getting that error so I installed OG again but that didnt solve the problem

but I will try to update drupal core and see what happens..

Thank u

shinery’s picture

I encountered the same problem. I used the Views 2 module. How could I do?

vm’s picture

how could you do what?

bugs for views.module should be reported *politely and with as much information as possible" in the views issue queue.

mamadoo06’s picture

Hi there,

Same problem here. Any solution ?

vm’s picture

considering you didn't reset the staus to active and you left the version at 6.11 I have to assume your version of drupal is outdated as well. Upgrade to the lastest version of 6.13 and if problem is still there. reopen this issue and set the proper version.

Otherwise you don't provide near enough information to track the problem.

Views.module is also mentioned by the user who started this thread, are you using views?
did you check the views issue queue?
are you running the latest version of views?

j0rd’s picture

Version: 6.11 » 6.13
Status: Fixed » Active

Same issue on Drupal-6-13 and latest views 6--2-6

j0rd’s picture

A very simple debug turns this up

added dpm line in views/includes/view.inc line 1245

  function &load($arg, $reset = FALSE) {
    static $cache = array();

    // We want a NULL value to return TRUE here, so we can't use isset() or empty().
    dpm(array("ARG" => $arg, "CACHE" => $cache)); /* I ADDED THIS */
    if (!array_key_exists($arg, $cache) || $reset) {
   ....

I get two outputs

#1
$arg = "user_list"
$cache = NULL

#2
$arg = (object)$user;
$cache = NULL

Andrzej7’s picture

I have the same problem (Drupal 6.13, Views 6.x-2.6):

My Recent post:
warning: array_key_exists() [function.array-key-exists]: The first argument should be either a string or an integer in /var/www/prawica.net/sites/all/modules/views/includes/view.inc on line 1245.
warning: mysql_real_escape_string() expects parameter 1 to be string, object given in /var/www/prawica.net/includes/database.mysql.inc on line 321.
warning: Illegal offset type in /var/www/prawica.net/sites/all/modules/views/includes/view.inc on line 1249.
warning: Illegal offset type in /var/www/prawica.net/sites/all/modules/views/includes/view.inc on line 1284.
warning: Illegal offset type in isset or empty in /var/www/prawica.net/sites/all/modules/views/views.module on line 699.

Applied a change in view.inc and have a blank page and a message:

Fatal error: Call to undefined function dpm() in /var/www/mysite.net/sites/all/modules/views/includes/view.inc on line 1245

Any help?

Andrzej7’s picture

Category: support » bug

I change for a bug - this page: tracker/[id] is not working

j0rd’s picture

I would recommend removing the dpm code I posted from your view.inc. This was for debugging, requires the devel module and will not resolve the issue anyways.

@Andrzej7: By any chance do you have a theme and a module with the same directory name?

vitis’s picture

I have the same problem:

When I go to Recent Posts>My Recent Posts (as admin or any of my users), I get this error message.

  * warning: array_key_exists() [function.array-key-exists]: The first argument should be either a string or an integer in C:\Programs3\drupal\wamp\www\drupal-6.10\sites\all\modules\views\includes\view.inc on line 1271.
    * warning: mysqli_real_escape_string() expects parameter 2 to be string, object given in C:\Programs3\drupal\wamp\www\drupal-6.10\includes\database.mysqli.inc on line 323.
    * warning: Illegal offset type in C:\Programs3\drupal\wamp\www\drupal-6.10\sites\all\modules\views\includes\view.inc on line 1275.
    * warning: Illegal offset type in C:\Programs3\drupal\wamp\www\drupal-6.10\sites\all\modules\views\includes\view.inc on line 1310.
    * warning: Illegal offset type in isset or empty in C:\Programs3\drupal\wamp\www\drupal-6.10\sites\all\modules\views\views.module on line 699.

-this is from my test site; I get a similar message on the live site.

in Views>Tracker (default), I see Default view and Page view, both with the title "recent posts." There is no other view here - nothing that says "my recent posts" or indicates any type of filtering for user.

I have reverted my site to old snapshots and still have this issue. My most recent version does have a view of recent posts that I created by cloning Tracker. I made a block of the 5 most recent content-specific posts for the front page.

Do I need to configure "my recent posts" myself - or is it does it get created when I enable views? If I do need to make it myself, should I do it from my live site so that the file paths are correct?

I think I'll point my settings.php file to an old database (rather than an old snapshot) and see what I find.

Things to check out:
1. delete my custom made recent posts view
2. point the site to an old database

Thank you ahead of time for your ideas,
Vitis

FYI:
All of my development has been on my test site on my office pc (except for downloaded images), then I upload the database to the live site. That will soon be different since I have more users coming to my site to create content - don't want to mess their stuff up.

I do have pretty recent module versions:
Drupal 6.13
IMCE 6.x-1.2
Imce CCK Image 6.x-1.x-dev (2009-Jun-18)
Views 6.x-2.x-dev (2009-Jul-01)
Content Construction Kit (CCK) 6.x-2.x-dev (2009-Jul-04)
FCKeditor - WYSIWYG HTML editor 6.x-2.0-beta1

vitis’s picture

I just deleted my view that was made from cloning the Tracker view - then customizing it. The results:

Same error message as comment #12 when going to "My Recent Posts.".
"All Recent Posts" changed - they are now formatted differently; now it is in the format you see when you go to "Track". - So, my custom theme was affecting "Recent Posts." (probably because the page title was the same).

Vitis

vitis’s picture

I just pointed my test site to a database that did not have views enabled on it. Then I enabled Views 6.x-2.x-dev (2009-Jul-01), ran update.php, then enabled "Tracker."

What I now see is:
"Recent Posts" - looks fine
no "My Recent Posts"
no "Track" in "My Account"

Ug! Not sure that test helped much.

It looks like my best bet for diagnosis might be to uninstall Views from my test site (pc), then re-install the latest dev.

Vitis

vitis’s picture

The "My Recent Posts" issue seems to be related to the Tracker View in Views 2.

Here are some related Issue Nodes where I found my solution:

http://drupal.org/node/367069
http://drupal.org/node/367069
http://drupal.org/node/298722
http://drupal.org/node/430608
http://drupal.org/node/430608
http://drupal.org/node/363771
http://drupal.org/node/273346

For me, the solution was to disable the Tracker View in Views and remove the Page display from my custom view which had used the Tracker path. That view now has no path. Seems to work great now.

Hope this helps,
Vitis

skizzo’s picture

Version: 6.13 » 6.14

After enabling the default tracker view, tracker/uid gives me the OP error (with core tracker) and access denied (with tracker2)
As suggested by vitis , removing the Page display from the tracker view fixes the problem. Thank you.
Updating to D6.14.

vm’s picture

Status: Active » Closed (cannot reproduce)

per #15 this was a views related issue. thus closing against core.