Recently updated to rc2 and noticed the following errors using drush to do an update:

Performed update: redirect_update_7102 [ok]
class_implements(): Class RedirectController does not exist and could not be loaded entity.module:724 [warning]
in_array() expects parameter 2 to be array, boolean given entity.module:724 [warning]

Anyone else run into this?

CommentFileSizeAuthor
#10 issue redirect.png41.4 KBlearnbydrop

Comments

bozzie’s picture

Hi I am very new to Drupal but thought i would respond. I literally just had the same issue however I found that it was because "redirect.controller.inc" wasn't committing properly. Once I added it independently through git the module worked as expected. Let me know if that helps.

pdesai’s picture

@bozzie, where did you get the redirect.controller.inc file?

labboy0276’s picture

+1 I am seeing this as well

capogeannis’s picture

+1 same.

bozzie’s picture

The "redirect.controller.inc" file was a part of the "redirect-7.x-1.0-rc2.tar" file I downloaded from the update page of my site. FYI, I don't use Drush, I just download the tar file, extract it, copy the files into my local directory and then commit them through GIT. Sorry If I am not giving you enough information and I hope it helps if it's relevant.

jasom’s picture

This is what I see in putty after performed drush up command:

class_implements(): Class RedirectController does not exist and could not be loaded entity.module:724 [warning]
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 entity.module:84 [warning]
in_array() expects parameter 2 to be array, boolean given entity.module:84 [warning]
Philippe Labat’s picture

Same thing here.

-sh-4.2$ drush uli
class_implements(): Class RedirectController does not exist and could not be loaded entity.module:724                                                                     [warning]
in_array() expects parameter 2 to be array, boolean given entity.module:724
brad.bulger’s picture

it looks related to this comment in redirect_update_7100():

/**
 * Empty update hook.
 */
function redirect_update_7100() {
  // This update hook was added under the assumption it would trigger a registry
  // rebuild / entity info rebuild to inform Drupal about ie. the new location
  // of RedirectController. However, this only happens at the end of an update
  // run.
  // @todo: If we ever use redirect entities / the controller in update hooks,
  // remember to do a manual registry / entity info rebuild.
}

the error is because the new redirect.controller.inc file hasn't been included, apparently, and there are now newer update hooks than 7100. the errors only happen during the updatedb, during the cache clear at the end i think.

doing a registry rebuild with drush using Registry Rebuild before doing the updatedb prevents the error.

geerlingguy’s picture

Status: Active » Closed (duplicate)

This is a duplicate of #2485459: Update hook 7100 does not do a registry rebuild or entity info cache clear; that issue will have the fix for this (and note that the error when running database updates won't cause any long-term issues or anything, it's just annoying :)

At the end of the update run, caches are rebuilt, and the RedirectController class is available.

learnbydrop’s picture

StatusFileSize
new41.4 KB

I'm getting same issue, when 'Redirect' module enabled with Drush