Open M0rgan01 opened 10 months ago
the deleted or moved files in 3.2.0 are not.
HUGE 😄
So if I understand correctly:
Let's consider a module XYZ, which has 2 versions: version v1.1.0 and version v2.0.0
Between version v1.1.0 and v2.0.0, the file A has been moved from one location to another, the file B has been deleted.
What happens when we perform the upgrade of module XYZ from v1.1.0 to v2.0.0 ; using the API to download the v2.0.0 ZIP, is that
Obviously, the fact that moved files and deleted files remain can create big problems.
The upgrade core system solves the above problem using a list of checkshums to find what moved, what was added and what was deleted. The upgrade module system does not have this ability and the API does not provide any checksum list.
An example on the same module. Here the LinkBlock, LinkBlockPresenter and LinkBlockRepository files should have been deleted. Capture vidéo du 27-09-2023 15:46:18.webm
Hello @M0rgan01
I didn't manage to reproduce your issue , I'm blocked with this Error in the upgrade process
Is this related to your problem ? WDT ?
Please check and feedback ! Thank you !
Hello @M0rgan01 ,
I've tried installing my shop multiple times, wih multiple versions of PHP, but I always encounter an error.
Maybe this can be tested by a dev ? WDYT ?
@florine2623 Hi ! I think this is another mistake. The subject of the ticket is easily testable with the video (https://github.com/PrestaShop/PrestaShop/assets/36233446/e387c406-35a6-4813-a9ca-799c44afbe54) that I posted above, which shows that there are residual files during a module upgrade. There will be no visible errors, but residual files may cause unwanted behavior.
same problem
Hi @M0rgan01
Thank you for your details but currently when I check you video, I see that in your ps_linklist.php have constantly the correct version before and after the upgrade of your module. And don't understand the problem after. Can you give us what we should not have after the upgrade ?
Waiting for your feedback
After further research, I reproduce your issue on prestahsop version 1.7.8.10 as you can see :
Untitled_ Nov 9, 2023 5_08 PM.webm
I'll add it to the backlog.
Waiting for your PR,
Thank you
Prerequisites
Describe the bug and add attachments
During the autoupgrade phase, modules are upgraded multiple times:
api.prestashop.com
.However, the second phase lacks a checksum to determine if files need to be removed.
Exemple:
1 - Our prestashop version 1.7.4.4 contains the linklist module in version 2.1.5. 2 - We are upgrading to prestashop version 1.7.5.0, which contains the linklist module in version 2.1.5. 3 - We proceed to the "upgradeModules" step, which calls the API
api.prestashop.com
and updates the linklist module to version 3.2.0. 4 - The process unzips 3.2.0 onto 2.1.5, but without checksum, the deleted or moved files in 3.2.0 are not. 5 - In this example we have an errorPHP Fatal error: Uncaught Error: Class 'PrestaShop\Module\LinkList\Presenter\LinkBlockPresenter' not found in /usr/src/myapp/modules/ps_linklist/ps_linklist.php:87
, but there may be other side effectsThe problem is the same if we update the module with the manager module.
Expected behavior
No errors during automatic update or module update
Steps to reproduce
PrestaShop version(s) where the bug happened
1.7.4.4
PHP version(s) where the bug happened
7.2
If your bug is related to a module, specify its name and its version
ps_linklist
Your company or customer's name goes here (if applicable).
No response