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

Invalid scope website when upgrading to 4.14.0 #833

Closed
janssensjelle opened this issue Apr 2, 2024 · 8 comments
Closed

Invalid scope website when upgrading to 4.14.0 #833

janssensjelle opened this issue Apr 2, 2024 · 8 comments
Labels
bug Something isn't working released

Comments

@janssensjelle
Copy link

Plugin version

4.14.0

Magento version

2.4.6-p4

PHP version

8.2

What went wrong?

Migration script causes invalid scopes

Reproduction steps

  1. Upgrade to 4.14.0 from 4.13.0
  2. Start setup:upgrade

Relevant log output

Module 'MyParcelNL_Magento':
Upgrading data..
Migrating postnl for scope default (2)
Migrating dhlforyou for scope default (2)
Migrating dhleuroplus for scope default (2)
Migrating dhlparcelconnect for scope default (2)
Migrating ups for scope default (2)
Migrating dpd for scope default (2)
Migrating postnl for scope stores (2)
Migrating dhlforyou for scope stores (2)
Migrating dhleuroplus for scope stores (2)
Migrating dhlparcelconnect for scope stores (2)
Migrating ups for scope stores (2)
Migrating dpd for scope stores (2)
Migrating postnl for scope website (0)
Enabling caches:
Current status:
layout: 1
block_html: 1
full_page: 1
Invalid scope website

Additional context

It creates invalid configuration like in the screenshot
Screenshot 2024-04-02 at 09 43 03

Also happens when clearing config table from all myparcel configuration.

@janssensjelle janssensjelle added the bug Something isn't working label Apr 2, 2024
@joerivanveen
Copy link
Contributor

Good morning @janssensjelle Can you share the contents of the config table regarding all paths starting with 'myparcel' so I can investigate further? You may e-mail the data or screenshot to our support email address, or paste it in this thread.

@janssensjelle
Copy link
Author

@joerivanveen , sure, here you go. I have also cleared the entire config data table with anything related to %MyParcel% and the problem still persists.

Before
Screenshot 2024-04-02 at 10 40 15

After clearing everything and running setup:upgrade
Screenshot 2024-04-02 at 10 42 07

@joerivanveen
Copy link
Contributor

Thank you for reporting the issue, I started working on this.
On a separate note, your entries are not at all what I was expecting, are you upgrading from a very old version, or a Belgian version? Is the screenshot from after you deleted myparcel% related entries?

@joerivanveen
Copy link
Contributor

Can you confirm or deny whether the scope website (without ‘s’) exists in your conifg table, and wheter there is a row with scope default and scope_id 2? If so, these are indeed illegal, and then the migration should maybe discard them rather than throw an error. The question is because I am having trouble reproducing your error at the moment.

@janssensjelle
Copy link
Author

janssensjelle commented Apr 2, 2024

I had the previous version, v4.13.0 working before.

There indeed is a scope website without 's' from a very old module. Setup:upgrade was working fine before with this in the config table.

Screenshot 2024-04-02 at 11 10 18

After deleting this data the setup:upgrade works again

@joerivanveen
Copy link
Contributor

Hi, thank you for working with me on this so quickly. It is correct that only since 4.14.0 the scopes are used in a migration within the myparcel plugin. I think it might be better if the migration just ignores invalid scopes instead of throwing an error, will make a pr to that effect.

@janssensjelle
Copy link
Author

janssensjelle commented Apr 2, 2024

To be honest, I think this migration script should not touch/load any other config entries other than the ones it owns.

@MyParcelBot
Copy link

🎉 This issue has been resolved in version 4.14.1 🎉

The release is available on GitHub release

Your semantic-release bot 📦🚀

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

No branches or pull requests

4 participants