• Remember to address to the Bug Tracking guidelines and to follow the instructions in the post ticket template.
  • Welcome to the Chevereto User Community!

    Here, users from all over the world come together to learn, share, and collaborate on everything related to Chevereto. It's a place to exchange ideas, ask questions, and help improve the software.

    Please keep in mind:

    • This community is user-driven. Always be polite and respectful to others.
    • Support development by purchasing a Chevereto license, which also gives you priority support.
    • Go further by joining the Community Subscription for even faster response times and to help sustain this space
  • Chevereto Support CLST

    Support response

    Support checklist

    • Got a Something went wrong message? Read this guide and provide the actual error. Do not skip this.
    • Confirm that the server meets the System Requirements
    • Check for any available Hotfix - your issue could be already reported/fixed
    • Read documentation - It will be required to Debug and understand Errors for a faster support response

Not a bug Tags not being saved to the database when editing in the UI

Version
4.5.6
Website URL
https://phpstack-1660275-6620239.cloudwaysapps.com/
PHP version
8.2
Database driver
MariaDB
Database version
10.11
Web browser
All browsers on MacOS (Chrome, Firefox, Brave, Safari)

LitGood

Chevereto Noob
I am working with a fresh install of version 4.5.6

I can update an image’s description field, and it sticks, but adding tags fails every time.

I used SQL queries to manually add some tags to images in the database as part of troubleshooting, but I am completely lost at this point.

Reproduction steps
  1. Go to any existing image
  2. Click Edit
  3. In the Tags field, type one or more new tags that do not already exist in the system (example: someothertest)
  4. Click Save changes

Unexpected result


The interface shows a success message. I can click the "edit" button again and the new tag shows up in the UI.

If I navigate away from the image, reload the image in the UI, and click "edit," the new tags are gone.

They were never saved to the database.


The JSON response returns HTTP 200 and claims success.


However, any tag that did not already exist in the chv_tags table (the ones I added manually) are completely discarded. Only tags that already exist in the database are kept and returned in the response.


Example from the actual response:


  • Submitted: "tags": "manualtest, someothertest"
  • Returned: only "manualtest" (the one that already existed). "someothertest" was dropped.
  • "tags": [] / empty tags_string when no pre-existing tags are present.

Manual INSERT into chv_tags + chv_tags_files works, and the tag then appears and persists. The application itself never creates new tags.


Error log message


No errors appear in the server logs, browser console, or on screen. The failure is completely silent.

I have not been able to trigger any errors in any way, shape, or form that would help debug this issue.
 
Additional findings:


I imported a large batch of images using the CLI bulk importer from the importing/no-parse folder.


Those images were created with guest ownership.


When logged in as the administrator, I was unable to add or save any tags on those guest-owned images. The UI would report success, but no tags were written to the database.


When I uploaded a new image via the normal website UI (while logged in), it was correctly owned by my admin account. On that image, I was able to add and save tags without any problem.


Conclusion: The tag-saving functionality appears to be restricted to the image owner only. Even the administrator cannot add tags to images that belong to a guest (or to another user).


This explains the original silent failure I reported.
 
Tags in v4 are restricted to users, and any guest content can't have tags. When admin/manager tags content, it does it in the name of the user who owns the content. As guest content lacks owner, the system silently fails to tag guest content.

At this time I've removed the tags input form to avoid further confusion: https://chevereto.com/community/threads/chevereto-v4-5-7-announcement.16424/#post-80280

Tags behavior will be re-evaluated for Chevereto v5.0 to determine if admin/manager should be able to tag guest content.
 
Thanks for the reply.

That makes total sense: not allowing guests to tag images and pollute the database. This is my first installation of this app, and things generally went smoothly. I did a pretty complicated dump from an Airtable database with 6,870 images, 1,500+ of which were keyworded and tagged. I was able to use Python to remap ALL of the keywords as tags to their respective images, and everything works great.

My first bulk sample upload via the CLI did not use the correct method, so those images were owned by “guest.”

Once I did it the proper way using parse-users instead of no-parse, I had no issues.

I have not set up a test user with limited permissions yet, but I assume that, moving forward, admins and managers can tag images and edit tags? I am doing more of an “invite-only” thing between friends, but we all want to be able to freely tag any image in the app with manager-level access, regardless of ownership.

SUPER impressed by the app overall. I had some snags in the install and setup, but once I got everything ported over from my Airtable database, it is super cool. I plan to add some extra UX tweaks and behind-the-scenes scripts to handle certain things the way I want to use this, but this is a great starter pack for my project.

If I create anything useful (and it is clean code), I’d like to push the code back to your team for possible integration into the app.
 
Back
Top