WBCE CMS Forum

WBCE CMS – Way Better Content Editing.

You are not logged in.

#1 21.09.2021 21:57:04

losttrip
Member

NWI mod_news_img_tags Database entry not removed after deleting Tag

Just an FYI - I was doing some testing of the Tags implementation and I noticed that the entry in the mod_news_img_tags database is not deleted when you delete a Tag in the backend.  Not sure if this is by design, or something that was missed.

Offline

#2 22.09.2021 07:34:52

florian
Administrator

Re: NWI mod_news_img_tags Database entry not removed after deleting Tag

It's a bug. I will see how to fix it.


Nicht ärgern. Nur wundern.

Offline

#3 22.09.2021 16:51:43

florian
Administrator

Re: NWI mod_news_img_tags Database entry not removed after deleting Tag

So maybe I'm wrong, but for me it seems that deleting the tag was just forgotten since global tags *are* deleted.

In the /modules/news_img/delete_tag.php, after

// remove the local tag
    $database->query(sprintf(
        "DELETE FROM `%smod_news_img_tags_sections` WHERE `section_id`=%d AND `tag_id`=%d",
        TABLE_PREFIX, intval($section_id), $tag_id
    ));

add, accordingly to the deleting of global tags, just

 $database->query(sprintf(
        "DELETE FROM `%smod_news_img_tags` WHERE `tag_id`=$tag_id",
        TABLE_PREFIX
    ));

This seems to work without complications...?

Last edited by florian (22.09.2021 16:52:27)


Nicht ärgern. Nur wundern.

Offline

Board footer

up