Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Upgrading from Craft 2 to 3 kills asset search #4875

Open
matthewmrotter opened this issue Sep 2, 2019 · 5 comments

Comments

@matthewmrotter
Copy link

commented Sep 2, 2019

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

  1. Upgrade site from 2 to 3 which contains many assets
  2. Attempt search
  3. 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
@brandonkelly

This comment has been minimized.

Copy link
Member

commented Sep 4, 2019

Can you post the element query you are executing that triggers this error?

@matthewmrotter

This comment has been minimized.

Copy link
Author

commented Sep 4, 2019

{% set query = craft.app.request.getParam('q') %}
{% set assets = craft.assets.search(query).source("not icons").orderBy('title') %}

@matthewmrotter

This comment has been minimized.

Copy link
Author

commented Sep 4, 2019

The only thing that fixes the query is getting rid of
search(query)

@brandonkelly

This comment has been minimized.

Copy link
Member

commented Sep 4, 2019

I’m not able to reproduce this. Can you please send a database backup from your Craft 2 site over to support@craftcms.com?

@matthewmrotter

This comment has been minimized.

Copy link
Author

commented Sep 4, 2019

Sent

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
2 participants
You can’t perform that action at this time.