bug Webservices PR-6.0-dev Pending

User tests: Successful: Unsuccessful:

avatar alikon
alikon
20 Apr 2025

Pull Request for Issue #45355 .

Summary of Changes

render the placeholder only

Testing Instructions

create a custom HTML module
create an article and embed it with something like {loadmoduleid 111}
do a GET via postman /api/index.php/v1/content/articles

Actual result BEFORE applying this Pull Request

error code 500

Expected result AFTER applying this Pull Request

no more error code

Link to documentations

Please select:

  • Documentation link for docs.joomla.org:

  • No documentation changes for docs.joomla.org needed

  • Pull Request link for manual.joomla.org:

  • No documentation changes for manual.joomla.org needed

avatar alikon alikon - open - 20 Apr 2025
avatar alikon alikon - change - 20 Apr 2025
Status New Pending
avatar joomla-cms-bot joomla-cms-bot - change - 20 Apr 2025
Category Front End Plugins
avatar alikon alikon - change - 20 Apr 2025
The description was changed
avatar alikon alikon - edited - 20 Apr 2025
avatar alikon alikon - change - 21 Apr 2025
Labels Added: PR-5.3-dev
avatar alikon alikon - change - 21 Apr 2025
The description was changed
avatar alikon alikon - edited - 21 Apr 2025
avatar alikon alikon - change - 21 Apr 2025
Title
render the placeholder only
[5.3] GET content/articles render the placeholder only
avatar alikon alikon - edited - 21 Apr 2025
avatar alikon alikon - change - 21 Apr 2025
The description was changed
avatar alikon alikon - edited - 21 Apr 2025
avatar QuyTon
QuyTon - comment - 5 May 2025

No error code 500 for me.

Before PR:
"text": "<p>Wrapper Component</p>\r\n<p></p>\r\n<p></p>\r\n<p></p> "

After PR;
"text": "<p>Wrapper Component</p>\r\n<p>{loadmodule mod_login Login 2}</p>\r\n<p>{loadmoduleid 134}</p>\r\n<p>{loadposition test}</p> "

Is this the expected result?

avatar HLeithner
HLeithner - comment - 15 Oct 2025

This pull request has been automatically rebased to 5.4-dev.

avatar HLeithner
HLeithner - comment - 15 Oct 2025

please don't use fastrope syntax vor better readability

avatar HLeithner
HLeithner - comment - 15 Oct 2025

is this a behavior change? I added the b/c break label because I'm not sure.

avatar richard67 richard67 - change - 2 Nov 2025
Title
[5.3] GET content/articles render the placeholder only
[5.4] GET content/articles render the placeholder only
avatar richard67 richard67 - edited - 2 Nov 2025
avatar richard67 richard67 - change - 2 Nov 2025
Labels Added: bug Webservices b/c break PR-5.4-dev
Removed: PR-5.3-dev
avatar Razzo1987
Razzo1987 - comment - 20 Dec 2025

I tested this fix across different Joomla versions with the following results:

✅ Joomla 5.4.1 (without patch)

Status: Working correctly

Request:

POST /api/index.php/v1/content/articles
{
    "title": "Swiper Slider - No settings",
    "alias": "swiper-slider-no-settings",
    "articletext": "<p>Example of Swiper Slider module without any settings (only images folder)</p><p>{loadmoduleid 111}</p>",
    "catid": "8",
    "state": 1,
    "access": 1,
    "language": "*",
    "featured": 0
}

Response: 200 OK (169.64 ms)

{
    "data": {
        "type": "articles",
        "id": "1",
        "attributes": {
            "title": "Swiper Slider - No settings",
            "alias": "swiper-slider-no-settings",
            "state": 1,
            ...
        }
    }
}

❌ Joomla 6.0.1 (without patch)

Status: Fails with 500 error

Request: Same as above

Response: 500 Internal Server Error (137.78 ms)

{
    "errors": [
        {
            "code": 500,
            "title": "Internal server error"
        }
    ]
}

⚠️ Important Note: Despite the 500 error response, the articles are still created in the database. This makes it difficult to detect failures in automated workflows, as the API reports an error even though the operation partially succeeds.


✅ Joomla 6.0.1 (with patch applied)

Status: Fixed!

Request: Same as above

Response: 200 OK (143.4 ms)

{
    "data": {
        "type": "articles",
        "id": "1",
        "attributes": {
            "title": "Swiper Slider - No settings",
            "alias": "swiper-slider-no-settings",
            "state": 1,
            ...
        }
    }
}

Conclusion

I know this patch targets Joomla 5.4, but I'm experiencing this issue specifically on Joomla 6.0.1 (not on 5.4.1), and this PR successfully resolves it. The fix allows POST requests with {loadmoduleid} placeholders in article content to work correctly on Joomla 6, preventing the 500 error.

The issue is particularly problematic because:

  • The API returns a 500 error, suggesting complete failure
  • However, the article is actually created in the database
  • This inconsistency makes error handling in automated scripts unreliable

It appears the issue might have been introduced in the Joomla 6.0 branch

avatar richard67
richard67 - comment - 20 Dec 2025

@Razzo1987 Could you also test if 5.4.1 still work with the patch? And after that, could you please mark your test result in the issue tracker here https://issues.joomla.org/tracker/joomla-cms/45357 by using the blue "Test this" button at the top left corner?

If the fix would be accepted for 5.4-dev, it would also be merged up into 6.0-dev and 6.1-dev and so also go into 6.

However, it might come too late for the upcoming 5.4.2 and 6.0.2 and 6.1.0-alpha2 releases as we will prepare these releases soon, so it would have to wait until 5.4.3 and 6.0.3 and 6.1.0-beta1 in February.

avatar Razzo1987 Razzo1987 - test_item - 20 Dec 2025 - Tested successfully
avatar Razzo1987
Razzo1987 - comment - 20 Dec 2025

I have tested this item ✅ successfully on b707ef5

Also tested on Joomla 5.4.1 (with patch).

It continues to work as before.


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

avatar exlemor exlemor - test_item - 16 Jan 2026 - Tested unsuccessfully
avatar exlemor
exlemor - comment - 16 Jan 2026

I have tested this item 🔴 unsuccessfully on b707ef5

I have tested this unsuccessfully but I think the test results might help:

Under 5.4.2, WITHOUT PR Patch - no 500 error code but, getting these results in Postman:
"text": <p>This is text above the Custom HTML module...<br><br><br><br>This is text below the Custom HTML module...</p> ,

Under 5.4.2, WITH PR Patch - no 500 error code but, getting these results in Postman:
"text": <p>This is text above the Custom HTML module...<br><br>{loadmoduleid 129}<br><br>This is text below the Custom HTML module...</p> ,

I am not matching the BEFORE condition of: error code 500 under 5.4.x
since a previous tester talked about 6.x, I also tried testing that and found this:

Under 6.1.0-alpha3-dev, WITHOUT PR Patch - 500 error code.
Under 6.1.0-alpha3-dev, WITH PR Patch, getting these results in Postman:
"text": <p>TEXT above call for module 132<br><br>{loadmoduleid 132}<br><br>TEXT before call for module 132</p>,

(I changed the text in 5.4.2 vs 6.1.0-alpha3-dev to make sure I would not confuse myself - the text is correct.


This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/45357.
avatar alikon alikon - change - 24 Jan 2026
The description was changed
avatar alikon alikon - edited - 24 Jan 2026
avatar alikon alikon - change - 24 Jan 2026
The description was changed
avatar alikon alikon - edited - 24 Jan 2026
avatar muhme
muhme - comment - 27 Jan 2026

@alikon Is the commit a response to @exlemor failed test? Could you comment on this, and is this PR ready for testing again?

avatar alikon
alikon - comment - 31 Jan 2026

@muhme the pr is ready to test , i have just made the code simple.

to answer @exlemor on testing the before condition that get 500 on 5.4 it depends from some 3rd part module, and not from custom HTML with just html alone, but since have passed quite a year when this pr has been opened i forget the condition on 5.4

i can move on branch 6.x

avatar muhme muhme - test_item - 5 Feb 2026 - Tested successfully
avatar muhme
muhme - comment - 5 Feb 2026

I have tested this item ✅ successfully on 09a0f7e

Tested with JBT on current 5.4-dev

  • Before PR, created 'Custom' site module, and inserted in article content '{loadmoduleid 111}'
  • curl -k -H "Authorization: Bearer $TOKEN" -H "Content-Type: application/json" -X GET 'https://localhost:7154/api/index.php/v1/content/articles/1' | jq
    • Results in 500 'Internal server error'
  • Applied PR with Patch Tester
  • Article is delivered with field text containing the unreplaced '{loadmoduleid 111}'
  • Installed Blog Sample Data
    • Tested getting article with API w/ and w/o PR resulting in same content
    • Scrolled trough home w/ and w/o PR looks identical
    • Compared three articles view w/ and w/o PR looks identical
  • No unusual Joomla log messages

This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/45357.
avatar dautrich
dautrich - comment - 5 Feb 2026

I tried to test this PR, but I didn't get the error 500 (without the patch applied).
I have to admit that I've never used the API and have no experience at all regarding Postman (used from VSC).

avatar gioacchino54 gioacchino54 - test_item - 5 Feb 2026 - Tested successfully
avatar gioacchino54
gioacchino54 - comment - 5 Feb 2026

I have tested this item ✅ successfully on 09a0f7e

The reported problem did not occur in version 5.4.
I also tested version 6 and without applying the patch, error 500 occurred, but with the patch applied, the problem did not occur.


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

avatar gioacchino54
gioacchino54 - comment - 5 Feb 2026

The reported problem did not occur in version 5.4.
I also tested version 6 and without applying the patch, error 500 occurred, but with the patch applied, the problem did not occur.


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

avatar muhme
muhme - comment - 5 Feb 2026

is this a behavior change? I added the b/c break label because I'm not sure.

@HLeithner As for the b/c break, yes, the imported module is not being rendered, but was it ever rendered? The 500 exception is a clear bug and this PR fixes it. Can you please check this yourself? If we have still doubts, should we rebranch it for 6.1?

avatar HLeithner
HLeithner - comment - 5 Feb 2026

This PR completely changed and doesn't fit the title? or did I miss something? At the moment it simply don't render on api.

avatar muhme
muhme - comment - 6 Feb 2026

This PR completely changed and doesn't fit the title? or did I miss something? At the moment it simply don't render on api.

@HLeithner In rendering the placeholder only and not importing the content, it prevents the current 500 'Internal server error'.

i can move on branch 6.x

@alikon Yes, please move it to 6.1-dev, Thank you

avatar alikon
alikon - comment - 6 Feb 2026

@muhme in 6.0 there is a bug without this pr so should be in 6.0

avatar alikon alikon - change - 6 Feb 2026
Title
[5.4] GET content/articles render the placeholder only
[6.0] GET content/articles render the placeholder only
avatar alikon alikon - edited - 6 Feb 2026
avatar alikon alikon - change - 6 Feb 2026
Labels Added: PR-6.0-dev
Removed: b/c break PR-5.4-dev

Add a Comment

Login with GitHub to post a comment