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

Cannot delete link where the "Enable Multiple Links" setting is enabled #25

Closed
Antimated opened this issue Feb 28, 2023 · 6 comments
Closed

Comments

@Antimated
Copy link

Antimated commented Feb 28, 2023

Describe the bug

Clicking this delete button:

Screenshot 2023-02-28 at 15 51 20

gives the following error in the console:

Screenshot 2023-02-28 at 15 51 57

Screenshot 2023-02-28 at 15 52 25

Seems like this.tippy isn't defined at this point.

Steps to reproduce

  1. Click the delete button
  2. Link is not deleted

Craft CMS version

4.3.10

Plugin version

1.0.4

Multi-site?

No

Additional context

Seems like the layout also breaks when adding multiple links
Screenshot 2023-02-28 at 16 05 15

@engram-design
Copy link
Member

Good call, this was due to multi-link fields with a single tab in their field layout. Fixed for the next release. To get this early run composer require verbb/hyper:"dev-craft-4 as 1.0.4"

@engram-design
Copy link
Member

Updated in 1.0.5

@Antimated
Copy link
Author

Antimated commented Mar 1, 2023

@engram-design now I have no delete button (there is no cog to select the delete option from). Seems like the settings cog only is displayed if the tabCount is greater than 1 and the block is not a static block (I presume static means a non multiple select hyper field).

I think the cog with at least the delete option should always show no? Because:

  1. If you change from multiple to a single hyper link you should still be able to remove the extra links you created previously
  2. If you have a static hyper link you should still be able to delete the link (or set the link type as "No link" (this might be another feature tbh)).

Screenshot 2023-03-01 at 08 50 55

@engram-design
Copy link
Member

engram-design commented Mar 1, 2023

Good call, fixed in 1.0.5.1.

You raise a good point with multi-to-single, and related to #8 I want to come to a solid decision on that first as to whether to add a "delete" for a single-link field. It's consistent behaviour when dealing with multi and single link blocks for the user, but not sure how that's going to sit with me.

Will be improving it.

@Antimated
Copy link
Author

Antimated commented Mar 1, 2023

@engram-design Sorry to bother you again but if have a single hyper field with no settings panel you still can click the cog wheel and it opens an empty panel (as I have no fields to display in the panel)

Screenshot 2023-03-01 at 09 36 37

Screenshot 2023-03-01 at 09 37 53

Screenshot 2023-03-01 at 09 38 50

@engram-design
Copy link
Member

Should be fixed properly in 1.0.5.2

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

No branches or pull requests

2 participants