club-1 / flarum-ext-cross-references

Add cross reference links when a discussion is mentioned from another one.
GNU Affero General Public License v3.0
6 stars 1 forks source link

Remove no more existent referal #43

Open PeopleInside opened 1 year ago

PeopleInside commented 1 year ago

Current Behavior

A topic is refereed from multiple sources for example discussion 403 and 404 The discussion 404 is now deleted and no more available so give a possibility to clean that from the note in the post:

immagine

I expect only 403 is listed as 404 has been removed. Also If I want keep the referral to 403 but remove only 404 that never exist I cannot because I can only delete all.

immagine

Expected Behavior

A deleted discussion should be no more listed in the referral or create separated alert where the obsolete voice can be deleted.

Steps To Reproduce

  1. Create a topic
  2. Refer this topic in two new different topic
  3. Delete one of this two new topic
  4. The first post will still have referral to the two topics, one of them has been permanently removed and who has community rights cannot fix the referral to leave just the valid topic referrall

Environment

Output of php flarum info

No response

PeopleInside commented 1 year ago

Another issue related to this is:

Now for solve the above issue I removed the both referral 403 that exist and 404 that has been removed. Now I go on discussion 403, I edit and report the message hoping to readd the correct referral note but nothing is added.

I create a new post in the 403 topic but the referral is no added any-more, seems I cannot reference no more the topic 403.

Maybe when a referral is deleted the system should readd where is missed if a new post in a topic is created.. also because I suppose the extension keep all in the database and this is not good.

I mean

Topic 402 in the main topic.

Topic 403 and 404 has been linked 402 that show the referral to 403 and 404 If I delete the referral message I hope also the database is cleared but is not because the extension still remember that Topic 402 has been referred by 403 and 404 and will never add again the referral. This will take space in the database.

If I delete the notice of the referral maybe also the database of the extension should be cleared or need maybe have some tool to purge that... and allow to readd the referral again.

Will be nice a way to manage that without logging in the database :)

n-peugnet commented 1 year ago

This is a duplicate of #37 for the first part.

For the second part I am not sure what would be the correct way to handle this. I don't think removing the reference in the database when the event post is removed is the right way. The post is only a consequence of the discussion beeing referenced, it seems strange that removing a notification should remove the reference from the database.

PeopleInside commented 1 year ago

Maybe a solution will be create a small delete icon near the row or a interface to manage row. I don't know but will be nice because edit the database for remove just one row is not very comfortable.. Also is the only way I have to add the note again once deleted. Thanks for this extension is amazing.