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

BUG: Indexing the site for the first can lead to an error #2830

Closed
MARQAS opened this issue Jun 7, 2022 · 2 comments
Closed

BUG: Indexing the site for the first can lead to an error #2830

MARQAS opened this issue Jun 7, 2022 · 2 comments
Assignees
Labels
bug Something isn't working

Comments

@MARQAS
Copy link
Contributor

MARQAS commented Jun 7, 2022

Describe the bug
Indexing the site for the very first time before sending the mapping may lead to an error
Example: 514 (Post): [illegal_argument_exception] mapper [meta._regular_price.double] cannot be changed from type [long] to [float]

Steps to Reproduce

  1. Install ElasticPress for the first time
  2. Add the details in the settings
  3. Skip the Setup
  4. Go to the sync page
  5. Click Sync Now from the top box

Expected behavior
Any sync process should check if the mapping is already sent or not before indexing the content

Screenshots
Screen Shot 2022-06-03 at 2 47 35 AM (2)

Additional context
We can either remove the first sync box during the setup or can send mappings along with it.

@MARQAS MARQAS added the bug Something isn't working label Jun 7, 2022
@JakePT
Copy link
Contributor

JakePT commented Jun 7, 2022

Normally during install the user will eventually be redirected to the sync page with the ?do_sync parameter so that a delete and sync is started automatically. However if install is skipped when the user navigates to the Sync page they will see a regular Sync and a Delete & Sync option. To avoid errors the first sync should be a delete and sync so that mappings are sent to Elasticsearch, but there's nothing stopping a user attempting a regular sync without sending mappings. This was not addressed with the Sync page JS refactor.

If mappings have not been sent, or an initial sync was not performed, the Sync page should be updated to only show a single option for syncing which will send mapping, and ideally have a message tailored towards an initial sync ("delete and sync" could be confusing if there's nothing to delete).

@JakePT JakePT self-assigned this Jun 7, 2022
@felipeelia
Copy link
Member

Although these are all good findings, I now realize #2695 covers the same root problem, so I'm closing this one in favor of that.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants