The following error happens when I try to visit admin/config/search/match_redirect (after enabling of course)

EntityFieldQueryException: Entity match_redirect has no base table. in EntityFieldQuery->propertyQuery() (line 1200 of /web/drupal7/www/includes/entity.inc).

CommentFileSizeAuthor
#8 match_redirect.patch548 bytessandergo90

Comments

biff45452’s picture

Assigned: Unassigned » biff45452
Status: Active » Postponed (maintainer needs more info)

It sounds like the install did not create the required table. Do you have any errors in your log from enabling the module?

SolomonGifford’s picture

The table was there in the database - and no RE enabling.

biff45452’s picture

Could you give me some details regarding your Drupal install:

  • Drupal Version
  • MySql Type and Version
  • PHP Version
  • Anything else you think might help me
biff45452’s picture

Issue summary: View changes
Status: Postponed (maintainer needs more info) » Closed (cannot reproduce)
okokokok’s picture

getting the same:

EntityFieldQueryException: Entity <em class="placeholder">match_redirect</em> has no base table. in EntityFieldQuery->propertyQuery() (line 1195 of includes/entity.inc).

PHP 5.4.4-14+deb7u8
MySQL 5.5.35-0+wheezy1
Drupal 7.26

Can't even disable the module with `drush dis match_redirect -y`. I had to remove the files to get my site working again.

okokokok’s picture

Status: Closed (cannot reproduce) » Active

Getting this error with both 1.0 and 1.x-dev.

biff45452’s picture

Tested on a fresh 7.26 install with php 5.4.19 and mysql 5.5.33 and could not reproduce. Did you get any other info in your logs?

sandergo90’s picture

Status: Active » Needs review
StatusFileSize
new548 bytes

I've created a patch to resolve this problem.

The problem was that you have forgotten to add the necessary options for hook_entity_info.

On a existing drupal install, truncate the cache tables in your database after adding this patch. On a fresh install this will work automatically.

okokokok’s picture

I managed to fix a site with this problem through clearing all cache through SQL.

silurius’s picture

Any chance of RTBCing #8 and patching one of the branches with it?

biff45452’s picture

I still haven't been able to reproduce this issue. Other modules such as the redirect module do not use the "forgotten" options and this patch changes the module to use the entity api module instead of the DrupalDefaultEntityController which would result in a dependancy. If you look at #8 and #9 it was probably the truncating the cache tables that fixed the issue and not the patch. If someone can post a configuration that results in the error that I can reproduce, I will look into it further.

trrroy’s picture

The patch in #8 did not work for me. Clearing cache through sql did. I have the same site running on 2 different servers. The problem repeats inconsistently on the machine with PHP 5.5.9-1ubuntu4.4 (cli) but does not happen on PHP 5.4.33 (cli).

trrroy’s picture

I think I found the consistency (for me). I had it installed on both machines without a problem so this is slightly different than the original report.

I see the problem after I do a drush sql-sync from the 5.4.33 to the 5.5.9 and then try to "drush cc all". The error prevents me from clearing cache and loading pages. If I delete the module files then I can drush cc all and pages start loading again. Then I restore the files and the error returns. It goes away if I truncate all cache tables through sql.

I am on Drupal 7.34 with match_redirect-7.x-1.0+4-dev. This is my error...

WD php: EntityFieldQueryException: Entity match_redirect has no base table. in EntityFieldQuery->propertyQuery() [error]
(line 1209 of /var/www/includes/entity.inc).
Drush command terminated abnormally due to an unrecoverable error. [error]
EntityFieldQueryException: Entity match_redirect has no base table. in EntityFieldQuery->propertyQuery() (line 1209 of /var/www/includes/entity.inc).

belaustegui’s picture

I'm also having this problem.
The site goes basically unusable and the only solution is to clear the cache (without using drush, wich is also broken).
After the cache is cleared, the site works properly again. After an undetermined period of time, sometimes sooner and others later, the problem starts again.

labboy0276’s picture

So for us, this has happened for awhile. The patch in #8 does work but you have to do the following:

- After you apply the patch use drush rr
- If you move your DB around to another instance, use a drush rr again

If you want to just stop doing this:

- apply the patch
- put site in maintenance mode (if you want)
- remove all the match redirects
- uninstall the module
- drush rr && drush cc all
- enable the module
- apply redirects back

You should be fine after that. Either way you should be ok.

daniel.nitsche’s picture

Patch in #8 worked for me, just had to restart memcache in our case.