bug: article duplicate check is alias-only, missing catid filter #98

Closed
opened 2026-05-22 03:30:33 +00:00 by jmiller · 1 comment
Owner

Description

The article existence check in script.php:147-150 only checks alias = 'terms-of-service' without filtering by catid. If any article in any category has this alias, the plugin will skip creation and may link the menu item to the wrong article.

Fix

Add a catid filter to the query, or check both alias and category.

Files

  • src/script.php:147-150
## Description The article existence check in `script.php:147-150` only checks `alias = 'terms-of-service'` without filtering by `catid`. If any article in any category has this alias, the plugin will skip creation and may link the menu item to the wrong article. ## Fix Add a `catid` filter to the query, or check both alias and category. ## Files - `src/script.php:147-150`
jmiller added the joomlapriority: mediumbug labels 2026-05-22 03:30:33 +00:00
Author
Owner

Testing Steps -- Article duplicate check with catid filter

Setup

  1. Fresh Joomla 5.x install

Test A: Article in different category

  1. Manually create an article with alias terms-of-service in a category OTHER than Uncategorised
  2. Install the plugin
  3. Expected: The installer should detect the existing article and not create a duplicate

Test B: Normal install

  1. Fresh install with no pre-existing terms-of-service article
  2. Expected: Article created in Uncategorised category

Pass criteria

  • Installer handles pre-existing articles in other categories gracefully
  • No duplicate articles created in same category on reinstall
## Testing Steps -- Article duplicate check with catid filter ### Setup 1. Fresh Joomla 5.x install ### Test A: Article in different category 1. Manually create an article with alias `terms-of-service` in a category OTHER than Uncategorised 2. Install the plugin 3. **Expected:** The installer should detect the existing article and not create a duplicate ### Test B: Normal install 1. Fresh install with no pre-existing `terms-of-service` article 2. **Expected:** Article created in Uncategorised category ### Pass criteria - [ ] Installer handles pre-existing articles in other categories gracefully - [ ] No duplicate articles created in same category on reinstall
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: MokoConsulting/MokoJoomTOS#98