Upgrading from Craft 2 to 3 kills asset search
Nobody has claimed this yet.
- Dominant language
- PHP
- Stars
- 3.6k
- Forks
- 705
- Avg merge
- 1d 5h
- Merged PRs (30d)
- 134
Description
Description
After upgrading a site that's dependent on asset search, the default search for assets gives an "Undefined index: id" at line 1427 of ElementQuery.php
Steps to reproduce
- Upgrade site from 2 to 3 which contains many assets
- Attempt search
- Update all asset indexes to no avail
Additional info
After deleting assets, indexing, re-uploading and then re-indexing the search will work. That's not realistic with 10k PDFs
- Craft version: 3.3.0.1
- PHP version: 7.1.2
- Database driver & version: MySQL 5.6.38
- Plugins & versions: CP Field inspector, Freeform, Supertable, Simple Text
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start at ElementQuery.php line 1427 and reproduce the asset search failure after upgrading from Craft 2 to 3 with existing asset indexes. Trace the asset indexing and search path, using the reported deletion and re-upload behavior as a comparison. Done means searching existing assets works after migration and re-indexing without an undefined-index error.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- mysql, php
- Domain
- backend, databases, search
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 30/100