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

Multiple tags are added as one huge tag #1651

Closed
immanuelfodor opened this issue Nov 24, 2020 · 8 comments
Closed

Multiple tags are added as one huge tag #1651

immanuelfodor opened this issue Nov 24, 2020 · 8 comments
Labels
Milestone

Comments

@immanuelfodor
Copy link

Moved here from: dimtion/Shaarlier#55

My Shaarli is at the latest upstream master and I have the default space as tag separator. When I add several tags to a link, it's being created as one huge tag. The only way to get the tags separated is to edit the link and just hit save, then the tags are broken up just as they should. There is no change in the use case of how I share a link, I've always used spaces to share both in the webapp and in Shaarlier. Please look into this issue, it's rather difficult for me to type commas instead of spaces on mobile with lots of tags (commas are the only way now to circumvent this issue meanwhile using the Shaarlier app share).

Huge tags also show up in the tag search after a share is created:

image

The web is also displaying the one huge tag:

image

After hitting save, the tags are separated fine:

image

ArthurHoaro commented 42 minutes ago:

I can reproduce your issue using the Python client.

@ArthurHoaro ArthurHoaro added the bug it's broken! label Nov 24, 2020
@ArthurHoaro ArthurHoaro added this to the 0.12.2 milestone Nov 24, 2020
@dougbreaux
Copy link

Heh, as a new Shaarli user, I assumed this was working as designed and I just needed to delimit the tags differently 😄

@ArthurHoaro
Copy link
Member

ArthurHoaro commented Dec 29, 2020

Actually I was misusing the python client.

It should be:

shaarli post-link --description "python test"  --tags abc def

And not:

shaarli post-link --description "python test"  --tags "abc def"

Meaning that as specified in the documentation, an array of tags should be provided instead of a string. But it wouldn't harm to be more permissive.

So I suggest the following:

@immanuelfodor
Copy link
Author

Thank you, I've reopened the Shaarlier issue as requested :)

ArthurHoaro added a commit to ArthurHoaro/Shaarli that referenced this issue Dec 29, 2020
Even though the documentation specify that tags should be passed as an array, tags string is actually allowed. So this adds a proper parsing with configured separator.

Related to shaarli#1651
@ArthurHoaro ArthurHoaro added the API REST API label Dec 29, 2020
@ArthurHoaro
Copy link
Member

Thank you, I'm closing this as my first point has been done and merged, and other issue are not in this repo.

@immanuelfodor
Copy link
Author

Thank you! Building on the latest Shaarli master image (https://hub.docker.com/layers/shaarli/shaarli/master/images/sha256-2acd7f5abf8b4166785bee43146331587d963bbb48b96224be74f32e880d861a?context=explore), I can't see any change, the space-separated Shaarlier tags are still created as one huge tag. Only after an edit or pin action they are separated.

I assumed this PR would parse them correctly (addig backwards compatibility for string), although they still needed to be sent as an array from Shaarlier to comply with the API spec on the long run.

@ArthurHoaro ArthurHoaro reopened this Jan 4, 2021
@ArthurHoaro
Copy link
Member

:(

I will give it a try with Shaarlier to see what's going on.

@immanuelfodor
Copy link
Author

I use the API key login if it helps.

@immanuelfodor
Copy link
Author

I'm sorry, it works, closing the issue now 😃

Post mortem related to #1673 (comment) : Keel force updated the deployment when the new image was built but the pull policy was IfNotPresent. Although Kubernetes restarted the deployment on the image update, it didn't pull the new version as the underlying node had the same tag (master). I checked the image SHA as well, the problem sufaced.

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

No branches or pull requests

3 participants