RTC bug Webservices PR-5.4-dev Pending

User tests: Successful: Unsuccessful:

avatar alikon
alikon
24 May 2026

Pull Request resolves #44927 alternative to #45136

  • 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.

Summary of Changes

Refactor email sending logic in ContactController when no custom reply enabled

Testing Instructions

Set custom_reply parameter to true in com_contact
Try to send a message using webservices
POST https://yoursite/api/index.php/v1/contacts/form/{contact_id} with this example payload

{
    "contact_email": "email@example.org",
    "contact_message": "some text",
    "contact_name": "name",
    "contact_subject": "subject"
}

Actual result BEFORE applying this Pull Request

Exception

Expected result AFTER applying this Pull Request

no Exception

Link to documentations

Please select:

  • Documentation link for guide.joomla.org:

  • No documentation changes for guide.joomla.org needed

  • Pull Request link for manual.joomla.org:

  • No documentation changes for manual.joomla.org needed

avatar alikon alikon - open - 24 May 2026
avatar alikon alikon - change - 24 May 2026
Status New Pending
ca5bc64 24 May 2026 avatar alikon cs
avatar alikon alikon - change - 24 May 2026
Labels Added: bug Webservices PR-5.4-dev
avatar ThomasFinnern ThomasFinnern - test_item - 29 May 2026 - Tested successfully
avatar ThomasFinnern
ThomasFinnern - comment - 29 May 2026

I have tested this item ✅ successfully on 555e138

The test were made by a PHP script calling curl function similar to manual.joomla.org doc.

I debugged with phpstorm and found following

  1. Parameter show_email_form
    @alikon: On first tests i got an exception on ContactController.php line 122. Which did not change with the patch.
    Surprisingly when i changed parameter 'contact->form->Contact Form' from 'Use Global (Show)' to 'show' this

  2. Patch results
    I do know i changed a lot of the settings before the above find. This is my actual result:
    Without patch: "Error sending message"
    With patch: ""

:


This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/47819.

avatar ThomasFinnern
ThomasFinnern - comment - 29 May 2026

I have tested this item ✅ successfully on 555e138

The test were made by a PHP script calling curl function similar to manual.joomla.org doc.

I debugged with phpstorm and found following

  1. Parameter show_email_form
    @alikon: On first tests i got an exception on ContactController.php line 122. Which did not change with the patch.
    Surprisingly when i changed parameter 'contact->form->Contact Form' from 'Use Global (Show)' to 'show' this

  2. Patch results
    I do know i changed a lot of the settings before the above find. This is my actual result:
    Without patch: "Error sending message"
    With patch: ""

:


This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/47819.

avatar exlemor
exlemor - comment - 29 May 2026

@alikon with the Testing Instructions above, I get the same BEFORE and AFTER, code": 500, "title": "Internal server error". What am I doing wrong? :(

avatar alikon
alikon - comment - 1 Jun 2026

@exlemor my previous test instruction was very bad 😄
just enable the Custom Reply without pr you got execption
with pr no more

avatar exlemor
exlemor - comment - 1 Jun 2026

Hi @alikon, I assume you are being funny ;) but that's what I understood the Testing Instructions to be but I get the same 500 internal server error with or without the Patch ;(

avatar QuyTon QuyTon - test_item - 9 Jun 2026 - Tested successfully
avatar QuyTon
QuyTon - comment - 9 Jun 2026

I have tested this item ✅ successfully on 555e138


This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/47819.

avatar QuyTon
QuyTon - comment - 9 Jun 2026

I have tested this item ✅ successfully on 555e138


This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/47819.

avatar QuyTon QuyTon - change - 9 Jun 2026
Status Pending Ready to Commit
avatar QuyTon
QuyTon - comment - 9 Jun 2026

RTC


This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/47819.

avatar QuyTon
QuyTon - comment - 9 Jun 2026

RTC


This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/47819.

avatar QuyTon QuyTon - change - 9 Jun 2026
Labels Added: RTC
avatar muhme
muhme - comment - 11 Jun 2026

✅ Final test before merge with JBT. In a new nightly build installation:

  • First see frontend to understand the functionality
    • Set Contacts > Form > Custom Reply: No
    • Created one contact, linked to user to ci-admin
      • ⚠️ set 'Contact Form: Show' for this contact, see 47942
    • Created menu item 'Single contact' with this contact
    • Was able to send email from site contact form
    • Was able to send email from API
  • See the issue error
    • Set Contacts > Form > Custom Reply: Yes
    • Sending email from site contact form is no more possible
      • Silent, w/o any notice, the formular is reopened with empty fields, no email sent from Joomla 👉 email have to be send by 3rd party plugin (not tested!)
    • Sending email with API fails with 400 'Error sending message'
  • Applied the PR with Patch Tester
    • ✅ Trying to send email with API is 200 OK, no email sent from Joomla 👉 email have to be send by 3rd party plugin (not tested!)
avatar muhme muhme - change - 11 Jun 2026
Status Ready to Commit Fixed in Code Base
Closed_Date 0000-00-00 00:00:00 2026-06-11 16:37:56
Closed_By muhme
avatar muhme muhme - close - 11 Jun 2026
avatar muhme muhme - merge - 11 Jun 2026
avatar muhme
muhme - comment - 11 Jun 2026

Thank you very much @alikon for your contribution. Thanks to @QuyTon and @richard67 for review and support. Thanks to @exlemor, @ThomasFinnern and @QuyTon for testing.

Add a Comment

Login with GitHub to post a comment