Skip to content

Comments

system test com_templates webservices#41695

Merged
laoneo merged 3 commits intojoomla:4.4-devfrom
alikon:template-endpoint-cypress
Sep 11, 2023
Merged

system test com_templates webservices#41695
laoneo merged 3 commits intojoomla:4.4-devfrom
alikon:template-endpoint-cypress

Conversation

@alikon
Copy link
Contributor

@alikon alikon commented Sep 10, 2023

Summary of Changes

API tests for following endpoints:

  • GET: /api/index.php/v1/templates/styles/site
  • GET: /api/index.php/v1/templates/styles/site/{id}
  • PATCH: /api/index.php/v1/templates/styles/site/{id}

@laoneo laoneo merged commit b3f5c9f into joomla:4.4-dev Sep 11, 2023
@laoneo laoneo added this to the Joomla! 4.4.0 milestone Sep 11, 2023
@alikon alikon deleted the template-endpoint-cypress branch September 11, 2023 17:36
@HLeithner
Copy link
Member

That silent error seems wrong to me, we shouldn't ignore modification requests without noticed, actually the exception is right from my point of view. the patch request shouldn't include a the template in the first place

@alikon
Copy link
Contributor Author

alikon commented Sep 12, 2023

the problem is that even if you don't include template in the payload of the PATCH request
as per https://github.com/joomla/joomla-cms/blob/4.4-dev/libraries/src/MVC/Controller/ApiController.php#L397-L406
it's included as well, there are some keys like template and or password that for PATCH needs some extra management
done in the preprocessSaveData

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants