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

Cancel button does not remove database entries from attachments #9730

Open
rich20 opened this issue Sep 2, 2024 · 6 comments
Open

Cancel button does not remove database entries from attachments #9730

rich20 opened this issue Sep 2, 2024 · 6 comments

Comments

@rich20
Copy link
Member

rich20 commented Sep 2, 2024

Describe the bug
https://www.kunena.org/forum/k-6-3-0-support/168554-strange-error
Confirmed

To Reproduce

  1. Create post
  2. Upload Picture
  3. Press Insert in message
  4. Cancel post
  5. Go to Attachment Manage and try delete this attachment

Actual result
Cannot save topic: Category 0 doesn't exist!

Additional context
The reason is that it does not remove the database entry with the cancel button as it used to. This results in an orphaned database entry.

System information

  • Joomla version: ‎5.1.5-dev
  • Joomla template: CASSIOPEIA
  • Kunena version: 6.3.5-DEV
  • Kunena template: Aurelia
  • Php version: 8.2.20
  • Database version: 10.5.25-MariaDB

Desktop

  • OS: Ubuntu 22.04.1 LTS
  • Browser: Chromium, Firefox and Opera
@rich20 rich20 added this to the 6.3 milestone Sep 2, 2024
@rich20 rich20 changed the title Chancel-Taste entfernt keine Datenbankeinträge von Anhängen Chancel button does not remove database entries from attachments Sep 2, 2024
@rich20 rich20 changed the title Chancel button does not remove database entries from attachments Cancel button does not remove database entries from attachments Sep 2, 2024
@Gindi50
Copy link

Gindi50 commented Sep 3, 2024

Joomla 5.1.4, Kunena 6.3.4 Database: 10.6.15-MariaDB

I have just tried to reproduce the error from #9730.

  1. created a new topic.

  2. uploaded a picture.

  3. inserted into the topic with ‘Insert’.

  4. cancelled the topic with ‘Cancel’.

  5. deleted the inserted image in the profile under attachment management.

Current result: Error message ’

danger

The topic cannot be saved: Category 0 does not exist! ’

But in the profile in the attachment management the image is deleted.

In the database, the image only exists once in jom5_kunena_attachments.

@rich20
Copy link
Member Author

rich20 commented Sep 3, 2024

@Gindi50 Does it also add an orphaned attachment entry in the diagnostics?

@Gindi50
Copy link

Gindi50 commented Sep 3, 2024

Yes, one problem was displayed with attachmentOrphaned.

@Gindi50
Copy link

Gindi50 commented Sep 4, 2024

I have tested again with three pictures.

After selecting and before inserting the images, the images are already in profile/attachment management and in the database at jom5_kunena_attachment.

In Kunena/Tools/Diagnosis there are now 3 problems with attachmentOrphaned.

Then I inserted the three images.

Then I removed the three images in the post and everything was gone, the text and the images. The text field said ‘true’.

In the profile/attachment management there were only two pictures left, one was deleted.

In Kunena/Tools/Diagnosis there are now 2 problems with attachmentOrphaned.

In the database at jom5_kunena_attachment there are now 2 images.

Then I cancelled the post. (With the known error message)

In the profile I could delete the two pictures (with the known error message)

The other two images were also deleted in the database.

There was also no problem in the diagnosis.

@Pinkeltje
Copy link
Contributor

Pinkeltje commented Sep 4, 2024

When using cancel button there are no entries for those images in attachment manager.
Only error is that they remain in database. But it doesn't cause any error in site or administrator and when in Diagnostics attachmentOrphaned you click delete broken items, that "problem" is solved as well. So I really don't see the problem (except from the remaining entries in de database)

Copy link

github-actions bot commented Oct 7, 2024

This issue is stale because it has been open 30 days with no activity.

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

No branches or pull requests

3 participants