Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
I am trying to write a SimpleTest that covers a feature that uses ECK. The feature includes exported ECK components and the notice appears during the module install phase of the test. This notice didn't happen with rc2 but occurs in rc3 and current -dev. This is perhaps similar to #1365602: "Warning: array_keys() expects parameter 1 to be array," on module install?
Comment | File | Size | Author |
---|---|---|---|
#15 | eck-array_keys_error-2289241-15.patch | 265 bytes | grom358 |
#8 | eck-array_keys_error-2289241-8.patch | 282 bytes | mariacha1 |
Comments
Comment #1
func0der CreditAttribution: func0der commentedGot the same problem here.
With my current installation with Panles enabled and some other modules I get a white page, so this really needs a fix.
Aside from this, this always causes a warning if your cache_eck table is empty and the site is loaded.
This can easily happen if you are using memcache or something similar and the entry gets kicked out due to evictions.
I can not find a way to fix this, so please, someone with more code insight get to this.
Greetings
func0der
Comment #2
joelpittetI wonder since this recently went in and it has to do with the schema, that maybe they are related?
#1186552-25: Support Revisions in ECK
@longwave could you try this test you wrote again and see if it's still happening? And also if so, maybe a stack trace or breakpoint inside drupal_schema_fields_sql(). would give a few more hints
Comment #3
fmizzell CreditAttribution: fmizzell commentedI can see the warnings when running the behat tests, but when trying to get the warning while using ECK through the UI I've had no luck. Also I have not noticed the warning causing a WSOD. I've tried clearing the cache_eck table as suggested by @func0der without luck.
I am planning on trying memcache to see if I can get results like the ones pointed in this issue: #2268113: Error messages on enabling memcache/memcache_storage.
I am going to change the status of this issue until one of us can point out specific steps to reproduce this problem so we can try to fix it.
Comment #4
fmizzell CreditAttribution: fmizzell commentedComment #5
joelpittetAlso, this may fix it #2309321: Optimize code by using empty or isset instead of array_key_exists because I've made sure !empty() is used in every place array_key_exists() so we can avoid NULL values and it's faster due to the implicit isset() check than array_key_exists.
Comment #6
func0der CreditAttribution: func0der commentedI did not recognized it at first, but you released a new version. (Great :))
I tried to use the newest version (7.x-2.x-rc4).
I can not reproduce this problem in the current stable 7.x-2.x-rc4 version.
If I follow my procedure, which is described above, the page does not go down.
It does not rebuild the "bundle" cache in the `cacke_eck` table, but the entity_types are re-created after following the procedure described in #1.
I can not confirm that this problem does not occur during the "behat" tests, because I do not know how to tests those.
It would be nice, if you could confirm, that those are working flawlessly. :)
I really hope that one is fixed now.
Thanks for the quick reaction, by the way :)
Comment #7
agrozyme CreditAttribution: agrozyme commentedI write a class to do install.
The schema use feature module generated.
It will get the wraning.
eck 7.x-2.0-rc4
features 7.x-2.2
Comment #8
mariacha1 CreditAttribution: mariacha1 commentedFor whatever reason, the fix in https://www.drupal.org/node/1365602 doesn't seem to work for features-created entities during install when using drush. I get the warning listed above, but the attached patch fixes things for me.
Comment #9
agrozyme CreditAttribution: agrozyme commentedThank you mariacha1, it works!
Comment #13
fmizzell CreditAttribution: fmizzell commented@mariacha1 I committed a slightly modified version of your fix. Could you confirm that my version is fixing the issue? And thank you for the patch.
Comment #15
grom358 CreditAttribution: grom358 commentedIn aGov distro was getting the same warning. Backport of patch to rc5 resolved the issue.
Comment #16
hanoiiI believe this is still active, I am getting it by doing the following:
- create a bare entity type and bundle
- add one field (probably not an important step)
- export this as a feature
- remove all references to recently created entity or try it on a different install
- enable feature
Getting the same warning, patch in #15 fixed it.
I also debugged a bit and drupal is calling drupal_schema_fields_sql for a table ('eck_created_bundle') which I guess does not exists therefore the warning, resetting schema cache seems to fix it.
Comment #17
hanoiiPatch applies to rc7 cleanly.
Comment #18
delta CreditAttribution: delta at Studio.gd commentedThe patch resolve the issue for me, with an entity type exported via features, I didn't have the error anymore in the features install.
I have installed the rc7 on a clean install, and enabled a features with an eck entity_type exported.
before the patch i got the error,
after the patch the error is gone.
Comment #19
HnLn CreditAttribution: HnLn commentedHad the same problem in an install profile, patch in #15 fixes it.
Comment #20
alvar0hurtad0+1 the patch works
Comment #21
eric.napier CreditAttribution: eric.napier commented#2553429: eck_clean_up() logic wrapper
Comment #22
fmizzell CreditAttribution: fmizzell commented