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

Magento_Search/form-mini not found #1186

Closed
wouter-toppy opened this issue Nov 15, 2018 · 12 comments
Closed

Magento_Search/form-mini not found #1186

wouter-toppy opened this issue Nov 15, 2018 · 12 comments
Assignees
Labels

Comments

@wouter-toppy
Copy link
Contributor

Preconditions

Trying to search with autocomplete, gets an requireJs error about file not found.

Magento Version : CE

ElasticSuite Version : 2.6.2

Environment : development

Steps to reproduce

  1. Try search autocompete

Expected result

  1. Get the file

Actual result

GET http://toppy.docker/static/version1542276727/frontend/Magento/blank/nl_NL/Magento_Search/form-mini.js net::ERR_ABORTED 404 (Not Found)
@wouter-toppy
Copy link
Contributor Author

See Pull #1187

@romainruaud
Copy link
Collaborator

Hmmm...

We never faced such an issue.

Can you give us more details about your instance ? Please provide :

  • exact version number of Magento
  • exact version number of Elasticsuite
  • are you using any custom theme ? if yes, is it based on blank or Luma ?

Regards

@wouter-toppy
Copy link
Contributor Author

wouter-toppy commented Nov 16, 2018

hi @romainruaud

we're using Magento 2.3.0-beta32 with Elasticsuite 2.6.x-dev

we have our own theme. but its also happening on the magento blanc theme.

when i manually change the code line in your module its solves the issue.

if you look on the magento github, you see they also require it with /js/
https://github.com/magento/magento2/blob/26b744eee7089b3d44a450a2a239a15a75a3e977/app/code/Magento/Search/view/frontend/requirejs-config.js

and i also see the difference.

magento moved that file somewhere in 2.2.x
https://github.com/magento/magento2/blob/2.2/app/code/Magento/Search/view/frontend/requirejs-config.js

magento/magento2@8653ba1#diff-df5888442619e22b6f135ff4e932a86e

See: magento/magento2#16582

@romainruaud
Copy link
Collaborator

Ok... so it seems to be due to Magento having moved this file... Nice for compatibility backwards ...

We'll fix this one as part of our 2.3.0 compatibility.

Thank you for pointing this to us.

@wouter-toppy
Copy link
Contributor Author

yeah, the point is. magento has already moved the files in 2.2.6

so if you running 2.2.6 the module is also not working

@romainruaud romainruaud assigned rbayet and unassigned romainruaud Nov 19, 2018
@romainruaud
Copy link
Collaborator

@rbayet can you have a look on this one ?

The PR #1187 obviously fixes it on latest Magento version (2.2.6 and 2.3.0 beta) but I'd like to have something more smooth and of course something able to deal with backward compatibility.

Not sure it's possible actually ..... Maybe we can rely on something hacky for now, and fix it definitely later when we'll decide to drop support of Magento versions < 2.2.6.

@rbayet
Copy link
Collaborator

rbayet commented Nov 19, 2018

Actually, I don't see the change being done in the tag 2.2.6 yet, but the changes have definitely been made in the 2.2-develop branch.

Edit: the BC approach described in magento/magento2#16582 does not seem to apply to our case.
The "old : new" path mapping seems to be only taken into account if in the define() dependencies list, not in the requirejs-config.js.

romainruaud added a commit that referenced this issue Nov 19, 2018
@rbayet
Copy link
Collaborator

rbayet commented Nov 20, 2018

@romainruaud I focused on a smooth M2 2.2.x approach in PR #1190 but it will not work on 2.3 where the "old : new " path mapping is absent in Magento_Search.
I don't see a way to have a common hack working for both 2.2.x and 2.3.x : introducing ourselves the path mapping would work in 2.3x, probably do nothing in versions >= 2.2.7, but break in 2.2.6 and before.

So it looks like a new branch is required just for that fix and the other upcoming 2.3 fixes to come...

@wouter-toppy
Copy link
Contributor Author

@rbayet could you please make that branch with only this fix for now?
magento will release 2.3 very soon. this year according to the planning.

@romainruaud
Copy link
Collaborator

Hello,

so the issue is actually solved for 2.2 version of Magento, and BC compliant for all 2.2.x

If we do not find an hybrid or hacky way to get it working on Magento 2.3.0, I'm okay to have a different fix of this one being implemented into master branch (future 2.7.0 major), knowing that it would leverage our requirements to Magento > 2.3.0.

In the meantime, we will also contact Magento to ensure they did not report the "old : new" path mapping in 2.3.0, therefore creating a BC issue for us, but also for many people building extensions on top of their solution. Not sure they'll be able to provide a fix on time, or even to release another beta, since it's expected to be live on monday ...

@wiardvanrij
Copy link

wiardvanrij commented Dec 3, 2018

@romainruaud This issue is also with Magento 2.2.7 - What do you recommend to fix this? When is 2.6.4 of ES going to be released? :)

@rbayet
Copy link
Collaborator

rbayet commented Dec 3, 2018

@wiardvanrij 2.6.4 is going to be released very soon, probably next Thursday (CET).
It includes the fix for this bug in the 2.2.x line.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

4 participants