Follow-up to #1796596: Fix and prevent circular redirects
Problem/Motivation
Update hook 7100 does not do a registry rebuild or entity info cache clear, this only happens at the end of an update run. This was supposed to be happening because RedirectController is in a new location, so we cannot use the redirect entity controller in future update hooks without breaking some people's upgrades.
Proposed resolution
Do a manual registry rebuild & entity info cache clear
Remaining tasks
Patch
User interface changes
N/A
API changes
N/A
| Comment | File | Size | Author |
|---|---|---|---|
| #4 | 2485459-update-7100-registry-rebuild.patch | 834 bytes | dave reid |
Comments
Comment #1
dave reidComment #2
olli commentedRelated #2514978: entity.module 724?
Comment #3
geerlingguy commentedMarked #2514978: entity.module 724 as a duplicate. After updating to 7.x-1.0-rc2, I got the following message during database updates:
Comment #4
dave reidOk let's try this. Can anyone reproduce this to ensure this resolves the issue?
Comment #5
dave reidI managed to reproduce the original issue with those updating from rc1 and confirmed this will resolve the errors.
Comment #6
dave reidComment #7
dave reidCommitted #4 to 7.x-1.x.
Comment #10
sebumd commentedSince I had already installed the module and ran into this issue after upgrading from rc1->rc3, I manually did the following lines in my template.php. One important note is that this issue did not happen in a dev environment after installing via the Drupal web interface (with roughly the same database as prod). This happened when I did a git pull and overwrote rc1 with rc3 and then did an update.php.
registry_rebuild();
entity_info_cache_clear();
I've also cleared the cache, used the registry_rebuild module, and uninstalled/reinstalled the module. I still receive the following error:
Warning: class_implements(): Class RedirectController does not exist and could not be loaded in entity_crud_get_info() (line 724 of /var/www/html/daiss/sites/all/modules/contrib/entity/entity.module).
Warning: in_array() expects parameter 2 to be array, boolean given in entity_crud_get_info() (line 724 of /var/www/html/daiss/sites/all/modules/contrib/entity/entity.module).
Warning: class_implements(): Class RedirectController does not exist and could not be loaded in entity_type_supports() (line 84 of /var/www/html/daiss/sites/all/modules/contrib/entity/entity.module).
Warning: in_array() expects parameter 2 to be array, boolean given in entity_type_supports() (line 84 of /var/www/html/daiss/sites/all/modules/contrib/entity/entity.module).
Comment #11
pbattino commentedSame thing here. It does not look fixed at all.
I get this even prior to enable the module, as soon as I clear caches. If I remove the module from the /modules/ directory, the problem disappears.
Comment #12
pbattino commentedActually not! I found out that this happened when I switched branch, so it's an inconsistency created by mismatch between code and db. Clearing caches resolves the problem.
Comment #13
dani3lr0se commentedJust thought I'd drop message here to say that I ran into this today, on version 7.x-1.0-rc3. I was running `drush upwd admin --password="newpassword"` to reset passwords in our Drupal 7 multisite instance. We have the most recent version of the Redirect module and Drupal core (if that matters). Here is the output after running the command:
```
class_implements(): Class RedirectController does not exist and could not be loaded [warning]
entity.module:1474
in_array() expects parameter 2 to be array, boolean given entity.module:1474 [warning]
class_implements(): Class RedirectController does not exist and could not be loaded [warning]
entity.module:724
in_array() expects parameter 2 to be array, boolean given entity.module:724 [warning]
class_implements(): Class RedirectController does not exist and could not be loaded [warning]
entity.module:724
in_array() expects parameter 2 to be array, boolean given entity.module:724 [warning]
class_implements(): Class RedirectController does not exist and could not be loaded [warning]
entity.module:724
in_array() expects parameter 2 to be array, boolean given entity.module:724 [warning]
class_implements(): Class RedirectController does not exist and could not be loaded [warning]
entity.module:84
in_array() expects parameter 2 to be array, boolean given entity.module:84 [warning]
```
I didn't try any of the above fixes yet because we're on the most recent version of everything, so there is nothing to upgrade to. Even though I get this message, the command still runs and completes as intended.
Hope this was ok to share here, even though the issue is closed.