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

Prestashop 8 CSV Import Load Saved configuration not working #32416

Closed
2 tasks done
sanjaydungarwal opened this issue May 3, 2023 · 21 comments
Closed
2 tasks done

Prestashop 8 CSV Import Load Saved configuration not working #32416

sanjaydungarwal opened this issue May 3, 2023 · 21 comments
Labels
8.0.4 Affects versions BO Category: Back Office Bug Type: Bug Duplicate Resolution: issue closed because already reported Import / Export Label: Which BO under menu is concerned Invalid Resolution: issue closed because invalid

Comments

@sanjaydungarwal
Copy link

Prerequisites

Describe the bug and add attachments

While importing products using CSV Import, I am trying to load a saved configuration. On clicking on load button, the saved configuration is not loading. In the browser console, we receive an error :

Deprecated Feature Used:
Synchronous XMLHttpRequest on the main thread is deprecated because of its detrimental effects to the end user's experience. For more help, check https://xhr.spec.whatwg.org/ .

Affected Sources:

jquery-3.5.1.min.js:2

Expected behavior

The saved configuration should load.

Steps to reproduce

Goto Advanced Parameters>Import>CSV Import. Select products. On the next page, while matching field, try to load a saved configuration.

PrestaShop version(s) where the bug happened

8.04

PHP version(s) where the bug happened

8.1

If your bug is related to a module, specify its name and its version

No response

Your company or customer's name goes here (if applicable).

9gems.in

@sanjaydungarwal sanjaydungarwal added Bug Type: Bug New New issue not yet processed by QA labels May 3, 2023
@pavonic
Copy link

pavonic commented May 3, 2023

I solved in this way:

  • adding async: true in every ajax call in import.js
  • adding .trigger("chosen:updated"); at the end of the statement $('#type_value\\['+i+'\\]').val(matchs[i]).attr('selected',true) at line 78

@pavonic
Copy link

pavonic commented May 3, 2023

The Delete button doesn't work too. It seems that JQuery does'nt want an empty response from ajax call. So the solution is to substitute die(); with die("1"); in function ajaxProcessDeleteImportMatchs() in file /controllers/admin/AdminImportController.php

@hibatallahAouadni
Copy link
Contributor

Hello @pavonic

Could you please provide a screen record 🙏 and did you encounter this issue with older version?
Please check and feedback.

Thanks!

@hibatallahAouadni hibatallahAouadni added Waiting for author Status: action required, waiting for author feedback BO Category: Back Office NMI Status: issue needs more information Import / Export Label: Which BO under menu is concerned 8.0.4 Affects versions and removed New New issue not yet processed by QA labels May 9, 2023
@hibatallahAouadni
Copy link
Contributor

Hello @sanjaydungarwal

Since we had no news from you for more than 20 days, I'll close this ticket to avoid cluttering up the backlog.
Please note that you can always create a new one if further information pops up.

Thanks!

@hibatallahAouadni hibatallahAouadni added Invalid Resolution: issue closed because invalid and removed Waiting for author Status: action required, waiting for author feedback NMI Status: issue needs more information labels May 23, 2023
@ShaiMagal
Copy link
Contributor

Two fixes posted from panovic are legit.
We were facing totally same issues and after this two fixes working finally.

@Hlavtox
Copy link
Contributor

Hlavtox commented Aug 16, 2023

Yeah it doesn't work @hibatallahAouadni, try saving column configuration and loading it, doesn't work.

@ecopets
Copy link

ecopets commented Aug 21, 2023

pshop v8.0.4 This does NOT work. with or without the changes described above. The SAVE and DELETE work and can be observed changing the database table. But the LOAD function does nothing!

@doominio
Copy link

doominio commented Sep 3, 2023

I'm having the same problem on 8.1.0. I can save a configuration but can't load it.

@Hlavtox
Copy link
Contributor

Hlavtox commented Sep 3, 2023

Ping @PrestaShop/qa-functional please reopen this, it's a real issue

@doominio
Copy link

doominio commented Sep 3, 2023

After some searching I think this is a duplicate of this issue:
#32798

@ShaiMagal
Copy link
Contributor

ShaiMagal commented Sep 3, 2023

After some searching I think this is a duplicate of this issue: #32798

Only partially. There is only problem with import.js at issue 32798. But at this issue 32416, there is necessary to make PHP changes as well. Check pavonic reaction, there is fix for JS file and PHP as well.

Fixing only JS side is only partially solution and not fixing all isues. You have to edit PHP as well.

We tested this two fixes. Working well.

@doominio
Copy link

doominio commented Sep 3, 2023

We tested this two fixes. Working well.

Thanks! I made the PHP change and IT WORKS!!!

For reference: I fixed it making only one change to import.js and the change to the PHP file. I didn't do the "async: true" part, mostly because I didn't know what to change and where. But it seems to work without it.

@ShaiMagal
Copy link
Contributor

@hibatallahAouadni
This topic should be open again, more people have problems with this and it's necesarry to make fix for future versions.

@ecopets
Copy link

ecopets commented Sep 5, 2023

But users should NOT have to edit or "hack" files in order for something that is SUPPOSED to work as a normal function! Developers need to fix it properly and provide corrected files in and update or a patch. There is way too much problem solving being done by users hacking core files. That is not proper support.

@matks
Copy link
Contributor

matks commented Sep 5, 2023

Hi @ShaiMagal if you find that this issue is critical for you, and it's important to have it fixed soon, then you can invest into having it done 😉 You can hire a developer to fix it, or if you are a developer yourself, you can try doing it on your own 💪

The most important thing is to share that fix (that was already done, great 👍 ) and even better submit a Pull Request -- that's what the open source spirit is all about.

@ecopets The PrestaShop open-source project can be freely downloaded and used by anyone, but it is provided “as is”, with no warranty or dedicated support. The software moves forward thanks to everybody's effort, and your help is needed too 👍 . So when you say "Developers need to fix it properly and provide corrected files in and update or a patch." I say: do you think you can help fixing this problem properly? 😉

@ShaiMagal
Copy link
Contributor

@matks There is already posted fix for this and working well... :)
Fix is here published, check comments... :) So, anyone must commit it to your release...
Check @pavonic reactions, there are 2 fixes for JS and PHP and it is correct fix. Tested on few website of our customers.

@doominio
Copy link

doominio commented Sep 5, 2023

I think the only issue here is that the bug is closed and we can't reopen it, it's not a problem with how open source works.

@hibatallahAouadni said:

Since we had no news from you for more than 20 days, I'll close this ticket to avoid cluttering up the backlog. Please note that you can always create a new one if further information pops up.

So maybe a new ticket should be open?

@matks
Copy link
Contributor

matks commented Sep 6, 2023

So maybe a new ticket should be open?

Yes indeed 😉 this ticket was closed as the QA analyst who attempted to reproduce it was not able to observe the problem.

If a QA analyst fails to reproduce the problem, it does not mean there's no problem, it means it does not affect everyone so then we need to find what are the exact circumstances that make the bug happen. Sometimes the bug only appears for some PHP version or some MySQL version, sometimes you need a specific usecase like "3 products, with combinations, B2B mode is enabled and the shop accepts 3 languages and currencies" to make it observable.

If you think you can find the exact circumstances that make the bug happen, and allow anyone to reproduce it, then please submit a new ticket 👍 and provide the circumstances description in the ticket . These exact circumstances are very important as they allow anybody involved in the process to observe the bug and understand if the fix is valid.

Fix is here published, check comments... :)

This fix seems to work in your shop, which is already a great step, but does it pass CI? Does it meets the project quality standards? Until it does, it won't be merged. A little more work is yet to do.

For example the Symfony open source project will refuse a PR which does not add a unit test to prove the bug is gone, even if the suggested code changes are valid. This is because the software development industry usually considers untested code is broken code. I'm not so strict about code 😅 but I think you get the idea: the needed change is a piece of the work to be done, but incomplete.

If you're willing to help 😉 go ahead: submit a PR with the suggested code changes. Reviewers will guide you in the process if they believe something is missing to merge it.

I think you're waiting for me to pick up the code changes and do the PR myself but unfortunately I already am shouldering way too many topics, I can't be everywhere. So here's your chance to step forward 😉

@doominio
Copy link

doominio commented Sep 6, 2023

Hi @matks . The proposed fix is literally adding 3 characters in a php file and three words in jquery, not a lot of chances for it not to pass QC. ;)

Out of curiosity - does this feature work for you? Because as far as I can see, it's broken for everyone since 8.0.4 to at least 8.1.0. It takes all of 30 seconds to test it. It would be much appreciated, it's not the same if the bug is general or if it only affects some users.

The analyst that closed the ticket simply asked for verification, didn't get it on time and closed the ticket without checking.

@hibatallahAouadni
Copy link
Contributor

Hello everyone,

Thanks for your patience 🙏
We are aware of this issue, it is already in our debug backlog. This issue is a duplicate of #32798.
To be informed when it's fixed, please subscribe to the issue mentioned above.

Thanks!

@hibatallahAouadni
Copy link
Contributor

Duplicate of #32798

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
8.0.4 Affects versions BO Category: Back Office Bug Type: Bug Duplicate Resolution: issue closed because already reported Import / Export Label: Which BO under menu is concerned Invalid Resolution: issue closed because invalid
Projects
None yet
Development

No branches or pull requests

8 participants