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

Tags suggestion list is broken #7845

Closed
marcingajda opened this issue Apr 2, 2020 · 3 comments
Closed

Tags suggestion list is broken #7845

marcingajda opened this issue Apr 2, 2020 · 3 comments
Labels
stale Stale issues & PRs flagged for closing

Comments

@marcingajda
Copy link
Contributor

marcingajda commented Apr 2, 2020

Adding existing tags makes them display as slugs instead of names.
Probably a regression after #7822.

Details

Question Answer
Relevant Bolt Version 3.7
Install type Composer install
BC Break yes?
PHP version 7.3
Web server Nginx (latest)
For UX/UI issues Chrome

Reproduction

Bug summary

After selecting an existing tag from the select suggestion list it is saved in the database with the slug in the place of name. After that Bolt displays tags slugs instead of full names. Adding new tags works fine.

Steps to reproduce

  1. Create a content type eg.: articles with tags taxonomy like this
tags:
    slug: tags
    singular_slug: tag
    behaves_like: tags
    postfix: "Add some freeform tags. Start a new tag by typing a comma or space."
    allow_spaces: true
    listing_template: "tags.twig"
    options: {}
  1. Edit a record of this content type eg.: http://example.com/bolt/editcontent/articles/123
  2. Go to the tags selector and add a brand new tag like "Foo Bar"
    image
  3. Save the article and observe the Network tab in Chrome inspector to see that the tag is send properly
    image
  4. Refresh the editor and see that the tag looks good:
    image
  5. Edit a second article eg.: http://example.com/bolt/editcontent/articles/789
  6. Go to tags select and choose the same tag but from suggestion list
    image
  7. Save the article and see in the Network inspector that this time the tag is send as a slug:
    image
  8. Refresh the editor to discover that the tag displays in the select as slug
    image
  9. The same happens on the frontend
    image

Expected result

Tags should be always displayed with the original name

Actual result

After selecting a suggested tag it displays as a slug.
In the database it's also saved with incorrect name:
image

@stale
Copy link

stale bot commented Jun 2, 2020

This issue has been automatically marked as stale because it has not had recent activity. Maybe this issue has been fixed in a recent release, or perhaps it is not affecting a lot of people?
It will be closed if no further activity occurs, because we like to keep the issue queue concise and actual.
If you think this issue is still relevant, please let us know. Especially if you’d like to help resolve the issue, either by helping us pinpointing the cause of a bug, or in implementing a fix or new feature.

@stale stale bot added the stale Stale issues & PRs flagged for closing label Jun 2, 2020
@stale stale bot closed this as completed Jun 9, 2020
@decemberly
Copy link

I'm also having this issue in Bolt 3.7.

@hannesl
Copy link
Contributor

hannesl commented Jan 11, 2021

Same issue here.

Yes, #7822 is probably the culprit. That PR changed the article form to identify tags using their slugs rather than their names, which is probably a good idea, but somewhere there is some code that wasn't updated to reflect this. Another challenge is that new tags don't have a slug until they're saved, which is probably the reason why names were used instead of slugs to begin with.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
stale Stale issues & PRs flagged for closing
Projects
None yet
Development

No branches or pull requests

3 participants