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

Edit image not working at AssetPickerDialogComponent #2411

Closed
brunoslalmeida opened this issue Sep 24, 2023 · 3 comments
Closed

Edit image not working at AssetPickerDialogComponent #2411

brunoslalmeida opened this issue Sep 24, 2023 · 3 comments
Assignees
Labels

Comments

@brunoslalmeida
Copy link
Contributor

Describe the bug
The button edit from image picker is not working. Clicking it gives the following error:

Captura de Tela 2023-09-24 às 16 58 25

To Reproduce
using the oficial demo (https://demo.vendure.io/)

Steps to reproduce the behavior:

  1. Go to Inventory
  2. Click on Add Asset
Captura de Tela 2023-09-24 às 16 59 35
  1. Select a image
  2. Click the edit button
Captura de Tela 2023-09-24 às 17 00 13

Expected behavior
The edit page open

Environment (please complete the following information):

  • @vendure/core version: 2.0.7

Additional context
The bug can be reproduced at the oficial demo website.

@brunoslalmeida
Copy link
Contributor Author

The error relies at the url formation. Trying to reproduce it from the Asset page from Catalog, it does not happen, but when going to the Asset Dialog, it happens. Check the url at the left down corner.

Captura de Tela 2023-09-24 às 17 05 48 Captura de Tela 2023-09-24 às 17 06 03

@brunoslalmeida
Copy link
Contributor Author

I am assuming that this might being caused by the relative path used at Asset-Galley component.

[<div *ngIf="selectionManager.selection.length === 1">
<a [routerLink]="['./', lastSelected().id]" class="button-ghost">
{{ 'common.edit' | translate }}

](https://github.com/vendure-ecommerce/vendure/blob/0740c8733458207ab12fbccd05cd225c6bb6cca2/packages/admin-ui/src/lib/core/src/shared/components/asset-gallery/asset-gallery.component.html#L48)

@michaelbromley
Copy link
Member

Hi,

Thanks for the report. Yes, your diagnosis is correct - that routerLink directive needs to have the full path, not a relative one.

@michaelbromley michaelbromley moved this from 📋 Backlog to 🔖 Ready in Vendure OS Roadmap Sep 26, 2023
@michaelbromley michaelbromley moved this from 🔖 Ready to ✅ Done in Vendure OS Roadmap Oct 18, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
Status: 🚀 Shipped
Development

No branches or pull requests

2 participants