I get the following error message when running Coder Upgrade on a D7 installation which was upgraded from D6:
Undefined index: name in coder_upgrade_module_list() (line 578 of ...\sites\all\modules\coder\coder_upgrade\includes\conversion.inc).
I suppose this is caused by some leftover modules from the old D6 installation which are removed from the modules folder but are still listed in the "system" table. "conversion.inc" (line 564) queries the database to create the list of installed modules:
// Faster to query DB than to rescan files using _system_get_module_data().
I will try to delete the stale entries in the "system" table using phpMyAdmin.
Comments
Comment #1
Blauer Schatten commentedI have exactly the same problem. But cleaning my system table didn't help at all.
Have you done anything more than deleting the entries out of this table which are related to D6-modules ?
Comment #2
frank ralf commentedI don't think so. Have you tried also cleaning the cache tables?
Comment #3
solotandem commentedHave you tried the dev release?
You marked this as a bug, but indicate you are running on a site converted from D6 to D7, which is a bit of an imprecise environment. This module is intended to run in a clean D7 install. If an error occurs because of your environment, then that is not a bug (at best, it would be a feature request).
Comment #4
frank ralf commented@solotandem
IMHO an upgraded site from D6 is an obvious use case for Coder Upgrade. However, as the module runs fine indeed on a clean install of D7 I'm marking this as postponed.
Comment #5
solotandem commented@Frank, from the description of the problem and the context in which it is said to occur, this seems to be a bug created during the site upgrade from D6 to D7. The conversion process seems to be faulty leaving behind bad data. If that is the case, then the solution should be with the upgrade path, not this module to have to anticipate what all might be wrong. To take your suggestion to its extreme, this module (or any other module) should handle whatever goofy thing any other module might do to the site. That is, obviously, absurd.
IMHO your phrasing "an upgraded site from D6 is an obvious use case for Coder Upgrade" makes no sense. The module is intended to run in D7. A clean D7. That is the prerequisite, an unstated but implied dependency.
Comment #6
solotandem commentedComment #7
danchadwick commentedReopening this issue as the problem is present on a fresh install of D7 using coder 7.x-2.x-dev. I have resolved the similar problem on the module list page by applying patch 1828330-4 (setting hidden = TRUE in bad.info). This problem is present on the Upgrade tab. It is unrelated to the D6 to D7 conversion.
Debugging it, the cause is a row returned by the query from coder/code_sniffer/Test/bad.module, where the info does not contain a serialized $info['name'] array element.
If you're going to query the system table directly, I suggest something like:
This assumes the hidden = TRUE patch is committed, obviously.
Comment #8
mykmallett commentedAlso getting this, and many other unexplainable errors on a clean install.
Comment #9
webchickHere's a patch to add hidden = TRUE to bad.info. This stops the errors for me.
I would call this at least "major" because it appears to break your Drupal installation despite the fact that you have only downloaded Coder and put it under your sites/all/modules directory somewhere.
Comment #10
webchickAlso, this is coming from Code Sniffer, not Coder Upgrade.
Comment #11
webchickUh. Sorry for the noise. Reading the rest of the issue, I'm getting a completely different problem. :D
Comment #12
aendra commentedConfirming #7. Moving coder_sniffer out of my Modules directory causes the error to disappear.
Comment #13
ergophobe commentedIn coder_sniffer/Test/bad.info
That's the problem - the lack of a defined name is causing the error.
Simple fix, but what *is* the name? "Coder Sniffer Test - Bad" ????
Any value fixes the problem, I just don't know the right value.
Comment #14
Homotechsual commentedIt's supposed to be missing a name... It's an example of a BAD info file.
Comment #15
klausiCoder 7.x is frozen now and will not receive updates. Coder 8.x-2.x can be used to check code for any Drupal version, Coder 8.x-2.x also supports the phpcbf command to automatically fix conding standard errors. Please check if this issue is still relevant and reopen against that version if necessary.