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

Solidus Admin: Import legacy items after routes are generated #5612

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

mamhoff
Copy link
Contributor

@mamhoff mamhoff commented Jan 22, 2024

Summary

When importing legacy menu items into the new storefront's API, the import_menu_items_from_backend method will try reading the legacy menu item's paths. Those path might be defined in lambdas referencing route helpers, but those route helper are only available after the application's routes have been fully loaded.

I understand this is somewhat kludgy, but on the upside: It works.

Checklist

Check out our PR guidelines for more details.

The following are mandatory for all PRs:

Copy link

codecov bot commented Jan 22, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Comparison is base (69090d5) 88.57% compared to head (af57898) 88.57%.
Report is 7 commits behind head on main.

Additional details and impacted files
@@           Coverage Diff           @@
##             main    #5612   +/-   ##
=======================================
  Coverage   88.57%   88.57%           
=======================================
  Files         685      685           
  Lines       16405    16405           
=======================================
  Hits        14531    14531           
  Misses       1874     1874           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

When importing legacy menu items into the new storefront's API, the
`import_menu_items_from_backend` method will try reading the legacy menu
item's paths. Those path might be defined in lambdas referencing route
helpers, but those route helper are only available after the
application's routes have been fully loaded.

I understand this is somewhat kludgy, but on the upside: It works.
Copy link
Member

@tvdeyen tvdeyen left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks, but I really would like us to fix this where the issue actually happens. I looked into it once and it seems to happen in the admin configuration. Although the route resolution should happen later in the view layer where the route lambdas get actually called, but I haven't found a good solution yet.

@kennyadsl
Copy link
Member

Thanks, Martin. May I ask what is the actual problem here? I understand the technicalities but not what's the final result of this issue.

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

Successfully merging this pull request may close these issues.

None yet

3 participants