Project:Keys
Version:6.x-2.x-dev
Component:Code
Category:bug report
Priority:normal
Assigned:Unassigned
Status:closed (fixed)

Issue Summary

Select add key:

Fatal error: Cannot use object of type stdClass as array in /Applications/XAMPP/xamppfiles/htdocs/drupal/sites/all/modules/keys/keys.module on line 176

Uninstalled old installation (6.x-1.1), and readded 6.x-2.x and still get the error.

Comments

#1

Status:active» closed (fixed)

I've been able to fix my installation by uninstalling the current version of the module and reinstalling.

Don't know if it was a problem with uninstalling the old one or something else, but I'm going to mark this as "closed".

#2

Status:closed (fixed)» active

Hi,

I've reopened this as I've just hit the same problem - WSOD - with the same PHP error. This is with the dev version, but this is the first time I've installed this module (so no cruft from a previous install). Have uninstalled, reinstalled and run update.php, but I still get the same error when going to admin/settings/keys/add.

#3

Status:active» fixed

Should be fixed in latest dev branch.

#4

Hi,

OK, I've just installed the dev version. I was previously running the 6.x-1.1 version of Keys API. I deactivated (but didn't uninstall, as I probably should have) the module prior to activating the Keys module. A couple of notes (sorry if this goes a bit off-topic):

- The installation didn't seem to successfully add the db tables, but that might be because of the previous version of the module still being installed. Looking at the keys.install file, the keys_schema() function array still refers to 'keys_api' - maybe a leftover from the keys_api module? After an uninstall/reinstall the 'keys_api' table now exists in the db, but phpmyadmin is warning me that 'The following indexes appear to be equal and one of them should be removed: PRIMARY, kid.'

- I'm not seeing the error when navigating to 'admin/settings/keys/add', so I guess that's fixed - thanks! What I do see is a pulldown with the choice the between 'GMAP (Google Maps API key)' and 'Google Maps (Google Maps API key)' - not sure what the difference is!

#5

There really isn't a difference between the 'GMAP' and 'Google Maps'. It is simply an identifier to determine what service the key should be used with. The 'GMAP' is fine to use but would require other modules other than Gmap that would like to use the key to reference 'GMAP'. Since Gmap does use a Google Maps key. The 'Google Maps' one is a more generic naming so any module that wishes to use a Google Maps key can use. They could still use one call 'GMAP' but the naming fits better the other way and doesn't imply it is a Gmap only key. Ultimately Gmap should remove their service 'GMAP' and use the 'Google Maps' one.

Yes, both modules use the same table {keys_api}. I've debated on renaming the table for 2.x to {keys} but haven't decided on it yet. The only reason for sticking with {keys_api} is that it is a little more descriptive of what it contains, that being API keys. Your thoughts are welcomed. I do need to rework the indexes on the table, I just noticed what I had there the other day. I'm still no where near being an expert on indexing database tables, but I know better now then when I first set those indexes up.

#6

Hi,

Thanks for that info. I see there's a link on the module page to a patch for the GMAP module, so maybe that could be updated to use the 'Google Maps' reference, which might avoid any confusion.

I suspect the installation problem I saw was because I hadn't uninstalled the previous version of the module which used the same table name. Anyway, thanks for the fix for this issue - if I find anything else, I'll open a new one.

#7

Status:fixed» closed (fixed)

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

nobody click here