When I try to add a new index and press save a blank page is shown. The index is however created, but the status is:

"All items have been indexed (0 / 0)" - but there should be some fields to index.

Modules:

Chaos tools 7.x-1.x-dev
Entity API 7.x-1.0-beta3

CommentFileSizeAuthor
#8 add_index_blank_page.patch2.26 KBdrunken monkey
Support from Acquia helps fund testing for Drupal Acquia logo

Comments

drunken monkey’s picture

Status: Active » Closed (won't fix)

Sorry, this seems to be some incompatability with the Beta 3 version of the Entity API module. Sadly, the API isn't really stable, yet, so only the development versions of both will very likely work most of the time.

I just checked, just to be sure, and creating an index does work normally using the latest versions of both modules. If not, please feel free to re-open.

blue56’s picture

Status: Closed (won't fix) » Active

I have just upgraded the Entity API to 7.x-1.x-dev, and I still get a blank page.

blue56’s picture

I get this error in the Apache log:

PHP Fatal error: Allowed memory size of 134217728 bytes exhausted (tried to allocate 72 bytes) in .../d7rc1/modules/field/field.attach.inc on line 677, referer: .../?q=admin/config/search/search_api/add_index

drunken monkey’s picture

Oh, OK, looks like a problem with your local environment. Most important question: Does this happen with all entity types, or just with nodes?
If it doesn't happen with, e.g., taxonomy vocabularies then I suspect you have just too many nodes and entity.inc:457 in SearchApiIndex::postCreate() is the problem. This currently uses entity_load() to be as generic as possible, but of course, for larger sites loading all node objects into an array in memory is just madness.
Will have to fix that anyways (probably by assuming that non-exportable entities with a "base table" key in their entity info are all stored normally in the database) …

drunken monkey’s picture

Title: Add index result in blank page. » "Add index" results in blank page
blue56’s picture

"Add index" works with taxonomy term. I do have a lot of nodes, more than 10.000.

drunken monkey’s picture

Status: Active » Needs review
FileSize
2.26 KB

Does the attached patch work for you?

blue56’s picture

Status: Needs review » Active

Yes, the patch works. Thanks. :-)

I do however get another error when trying to index the nodes:

"Couldn't index items. Check the logs for details."

In the log this is written:

"An error occurred while trying to index items on index test1: No field settings for index with id test1."

I however has marked which fields that shoud be indexed.

drunken monkey’s picture

Good, I committed the patch.

Regarding your new problem: Are the fields still saved when you go to the index' "Fields" tab? And does this happen with a new index, not with the old one?

If both answers are "yes", I'm a bit confused — it would then seem that the database server doesn't save the index' fields successfully … It does work for me, though. But you should then probably create a new issue, instead of recycling this one.

blue56’s picture

I deleted the server and the index. Then I created them again, using different names. The server is a normal database server, not Solr. I still get the same error message. When I go back to the "Fields" tabs the corret fields are mark for indexing.

Could all the nodes cause problems here? Maybe you could make a test site with about 10.000 nodes? Just create a simple csv file and import it with the Feeds module.

drunken monkey’s picture

Status: Active » Closed (duplicate)

Ah, sorry, I could reproduce it now! It seems some yet uncommitted changes luckily already fix this. Therefore, please just wait for #991632: Incorporate newly available entity hooks, which will hopefully soon be committed (when Entity API catches up with their hook functionality).

blue56’s picture

OK, thanks alot for your help. I will try to wait for that fix.

gusCallado’s picture

Issue summary: View changes

Hi,
I'm using Drupal 7's Recruiter Module.
At Configuration >> Search and metadata >> Search API menu, I'm trying to include new fields in my index "Resume search", I am trying to include "Date changed" and "Resume state" that I removed by mistake and I am getting a blank page every time I click the "Save changes" button.
Any suggestinos?
Thanks in advance.
Gus