?
avatar joomlapi
joomlapi
27 Jul 2021

Steps to reproduce the issue

Using postman for example, paste the following text in body:
{
"alias": "",
"introtext": "

The word bold is in bold.
The word italic is in italic.

",
"catid": 2,
"language": "*",
"metadesc": "",
"metakey": "",
"title": "Test modification"
}
Then create the article (POST)

Expected result

In the back office you will find the article with the words "bold" and "italic" respectively in bold and italic.
You will find "

The word bold is in bold.
The word italic is in italic.

".

Then send a new requete en mode PATCH this time to modify the article.
Return a request but this time in modification (PATCH)

Actual result

This time you will find "

The word bold is in bold.The word italic is in italic.

"
You have lost all tags.

System information (as much as possible)

I would like to point out that in the back-office of the sites, in global configuration, text filters, all the fields are set to "No Filtering".

Additional comments

Hello,

I am a developer of mobile applications and discover the potential of web services under Joomla 4.
As an experiment, I am developing an Android application. This application allows you to manage one or more Joomla sites.

The features are very basic at the moment:

  • Creation / modification / deletion: articles, categories, users.
  • Site synchronization: A window allows you to select a source site, a source category, the destination site (s) then with a single click, the articles from the source site are replicated to the destination sites; articles that do not exist on the destination site are created, and existing articles updated.

Ultimately, my idea is to create a mobile application (Android initially then for iOS and Windows).
The objective is not to take over the native functionalities of Joomla - the Joomla back office is there for that - but to offer a certain number of additional tools for advanced users. Such as automatically synchronizing one or more sites, recovery with automatic integration of data from third-party sites. The only limit of the related "tools" is the imagination.

Today I am facing a first difficulty. One of my "tool modules" allows you to retrieve the article from a source site and replicate it to one or more destination sites. New articles are created without worry. On the other hand, I lose the tags when it comes to modifying an article.

Can anyone tell me if he observes the same problem?
Did I miss something?
Could it be a Joomla bug in web services?

This is my first post here, I hope I am in the right place and sorry for my bad English.
Best regards,
Eric.

Votes

# of Users Experiencing Issue
1/1
Average Importance Score
5.00

avatar joomlapi joomlapi - open - 27 Jul 2021
avatar joomla-cms-bot joomla-cms-bot - labeled - 27 Jul 2021
avatar alikon
alikon - comment - 30 Jul 2021

can you please export from postman your post request and attach here so we can investigate....i'm not sure i've fully understood what you mean

avatar joomlapi
joomlapi - comment - 9 Aug 2021

Hello Nicola,@alikon

First of all I create a new article:

POST {{base_path}}/api/index.php/v1/content/articles

{
"alias": "my-article",
"articletext": "

This bold line is in blue.

",
"catid": 2,
"language": "*",
"metadesc": "",
"metakey": "",
"title": "Here's an article"
}

Here is the result :
{
"links": {
"self": "https://joomlapi.android-apps.fr/api/index.php/v1/content/articles"
},
"data": {
"type": "articles",
"id": "107",
"attributes": {
"typeAlias": "com_content.article",
"id": 107,
"asset_id": 300,
"title": "Here's an article",
"alias": "my-article",
"state": 0,
"created": "2021-07-31 06:37:50",
"created_by": 539,
"created_by_alias": "",
"modified": "2021-07-31 06:37:50",
"modified_by": 539,
"publish_up": null,
"publish_down": null,
"images": [],
"urls": [],
"version": 1,
"metakey": "",
"metadesc": "",
"access": 1,
"hits": 0,
"metadata": [],
"featured": 0,
"language": "*",
"note": "",
"tags": [],
"featured_up": null,
"featured_down": null,
"text": "

This bold line is in blue.

",
"about-the-author": "",
"a-propos-de-lauteur-fr-fr": ""
},
"relationships": {
"category": {
"data": {
"type": "categories",
"id": "2"
}
},
"created_by": {
"data": {
"type": "users",
"id": "539"
}
},
"modified_by": {
"data": {
"type": "users",
"id": "539"
}
},
"languageAssociations": {
"data": []
}
}
}
}

In the back office, you see that the text "This bold line is in blue." is in bold and blue because the tag "strong" and so on...

Then I edit this article. I'm not actually modifying anything, just to test the modification, either:

PATCH {{base_path}}/api/index.php/v1/content/articles/107

{
"alias": "my-article",
"articletext": "

This bold line is in blue.

",
"catid": 2,
"language": "*",
"metadesc": "",
"metakey": "",
"title": "Here's an article (updated)"
}

Here is the result :

{
"links": {
"self": "https://joomlapi.android-apps.fr/api/index.php/v1/content/articles/107"
},
"data": {
"type": "articles",
"id": "107",
"attributes": {
"typeAlias": "com_content.article",
"id": 107,
"asset_id": 300,
"title": "Here's an article (updated)",
"alias": "my-article",
"state": 0,
"created": "2021-07-31 06:37:50",
"created_by": 539,
"created_by_alias": "",
"modified": "2021-07-31 06:44:51",
"modified_by": 539,
"publish_up": null,
"publish_down": null,
"images": [],
"urls": [],
"version": 2,
"metakey": "",
"metadesc": "",
"access": 1,
"hits": 0,
"metadata": [],
"featured": 0,
"language": "*",
"note": "",
"tags": [],
"featured_up": null,
"featured_down": null,
"text": "This bold line is in blue. ",
"about-the-author": "",
"a-propos-de-lauteur-fr-fr": ""
},
"relationships": {
"category": {
"data": {
"type": "categories",
"id": "2"
}
},
"created_by": {
"data": {
"type": "users",
"id": "539"
}
},
"modified_by": {
"data": {
"type": "users",
"id": "539"
}
},
"languageAssociations": {
"data": []
}
}
}
}

Comme vous pouvez le constater, le contenu du texte a perdu toutes les balises (couleur, gras, ...)

Nous obtenons ceci : "

This bold line is in blue.

"

à la place de : "

This bold line is in blue.

"

Je précise que dans le back office du site all filters are set as "No Filtering" 'but I don't know if it's related)

Best regards,
Eric.
Le 30/07/2021 à 16:53, Nicola Galgano a écrit :

can you please export from postman your post request and attach here so we can investigate....i'm not sure i've fully understood what you mean


You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub, or unsubscribe.


This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/34933.
avatar alikon
alikon - comment - 11 Aug 2021

confirmed
all html tags in articletext are stripped out on PATCH
please test #35086

avatar alikon alikon - change - 11 Aug 2021
Status New Closed
Closed_Date 0000-00-00 00:00:00 2021-08-11 07:36:41
Closed_By alikon
Labels Added: ?
Removed: ?
avatar alikon alikon - close - 11 Aug 2021

Add a Comment

Login with GitHub to post a comment