Pending

User tests: Successful: Unsuccessful:

avatar Hackwar
Hackwar
27 Nov 2026

Pull Request for Issue # .

  • I read the Generative AI policy and my contribution is either not created with the help of AI or is compatible with the policy and GNU/GPL 2 or later.

This change was created with the help of AI (Claude Code).

Summary of Changes

The install script of plg_task_weblinks inserts the mail template plg_task_weblinks.broken_links into #__mail_templates only in install():

  • If the template already exists (e.g. a discover install, a reinstall after an uninstall that did not remove it, or a site where the template was left by an earlier development version with a different dropTable() id), the insert fails with a duplicate key error that is shown as an error message.
  • update() never creates it, so a site where the template is missing (e.g. because the insert failed before) never gets it, and the broken links notification can't be sent.

createTable() now checks if the template exists before inserting it, and is also called on update.

Testing Instructions

  • Install the package, delete the row plg_task_weblinks.broken_links from #__mail_templates, then update the package with a build of this branch: the row exists again.
  • Install the package again on top of the existing installation (Discover or reinstall): no error message about the template.

Expected result

The template exists after install and update; no duplicate key errors.

Actual result

Missing template stays missing after an update; reinstalling can show "Error creating template_id plg_task_weblinks.broken_links: Duplicate entry …".

Documentation Changes Required

None

avatar Hackwar Hackwar - open - 27 Nov 2026

Add a Comment

Login with GitHub to post a comment