Questions tagged [joomla-api]

This tag is for questions related to the Joomla-API, both Joomla CMS and Joomla Framework.

Filter by
Sorted by
Tagged with
0 votes
1 answer
33 views

API Routes with more than one parameter in Joomla 4/5

I have an API route that should accept more than one parameter, but it seems that only one parameter is being recognised, like this: new Route( ['POST'], 'v1/myapiendpoint/:nr/:id', 'mycomponent....
cappu's user avatar
  • 139
0 votes
0 answers
22 views

Grant access to Joomla API from just one site

I finally got my Joomla 4/5 API component and plugin up and running. The API endpoints are called from an external website (Netlify) using the API tokens of a super user. - I experimented a bit with ...
cappu's user avatar
  • 139
0 votes
0 answers
21 views

How to handle duplicate items coming from an external JSON API and being imported as article content

I have adapted working code from Joomla 3 and the CLI to Joomla 4/5 and the API. The core functionality using the API system is working, but I am struggling to find a replacement for checking for ...
Mike Hermary's user avatar
1 vote
1 answer
110 views

File Upload from WebApp to Joomla API

I have successfully programmed a Joomla 4/5 API to generate an API web service. There is a kind of weird bug uploading files though, because it basically works on localhost - but on the live system I ...
cappu's user avatar
  • 139
0 votes
1 answer
49 views

Getting a Joomla 4 API component to work with language files

When programming a component for an API, the config contains the following language file definitions: <api> <files folder="api"> <folder>src</folder> &...
cappu's user avatar
  • 139
0 votes
1 answer
27 views

OnContentPrepare not working in custom Joomla Plugin

I have made other plugins for Joomla 4 but I am still a novice. The past two days I have been searching for a solution, it's becoming quite frustrating. I have brought back my code in the php file to ...
EJBJane's user avatar
0 votes
1 answer
35 views

J4 REST API Get users how to filter?

The J4 REST API allows me to GET a full list of users, but I have not found any example of how to filter such a request, for example by searching by userID or email. When I look at the code for the ...
Jeff Gilmore's user avatar
1 vote
0 answers
20 views

Updating user via J4 REST API resets password

In our organization we use Salesforce as the authoritative source of info about our users, so it makes sense for us to use that info when creating the associated users in our new Joomla site. I have ...
Jeff Gilmore's user avatar
2 votes
2 answers
85 views

How to authenticate a user with the official Joomla 4 REST API?

I am developing a mobile app that needs to authenticate users with a Joomla 4 site. I want to use the official Joomla REST API to do this, but I couldn’t find any information about how to authenticate ...
Hesam Mohseni's user avatar
2 votes
1 answer
78 views

Filling custom fields when creating an article with an script via the API

I am creating an article in Joomla 4 using the excellent code that is suggested here: Joomla 4 create article programmatically My task is write the values of the custom field simultaneously with the ...
Igor K.'s user avatar
  • 23
0 votes
1 answer
43 views

Jinput getAray not retrieving RAW details from codemirror editor in Joomla 4

I am busy with a project to convert an Joomla 3 template to Joomla 4. The Jinput is not giving me RAW data it is removing the script tags from my inputs. I worked through a couple of similar problems ...
Niel Buys's user avatar
0 votes
1 answer
29 views

J4 API Test Helper missing functions

So I installed codeception/module-rest and created an api.suite.yml containing: modules: enabled: - Helper\JoomlaDb - Helper\Api config: Helper\JoomlaDb: dsn: "mysql:host=...
maidan's user avatar
  • 383
0 votes
2 answers
179 views

Help with update a JoomlaCli-Application from Joomla 3 to Joomla 4

I'm working with a JoomlaCli Application, called from a external php command via a cronjob. It worked in Joomla 3, but in Joomla 4 some classes have changed. Our class name is import Namespaces: use ...
Corak55's user avatar
1 vote
0 answers
41 views

Joomla 4 API rename attributes

In Laravel, you can use eloquent mutator transforms to change field names (database table column name) to a preferred/alias property name. How can this be done in Joomla 4? I know I could do this in ...
maidan's user avatar
  • 383
1 vote
2 answers
89 views

Joomla 4 API MVC Layer type

Is it possible to create a webservice and API access for my own component if the component file structure is not setup like this and uses namespace based classes? https://docs.joomla.org/J4.x:...
maidan's user avatar
  • 383
1 vote
1 answer
119 views

Webservices returns The requested URL was not found on this server with a 404

When using Webservices on my local development environment, but the problem is not unique to local environments, I received the following message for even the core features, The requested URL was not ...
Irata's user avatar
  • 3,597
2 votes
1 answer
123 views

How to initialize joomla modal through js

I'm customizing a view in my component, I have tabs, each tab contains a modal, but when adding a new tab using js, I don't know how to initialize the new tab's modal via js?
pdutie94's user avatar
4 votes
0 answers
627 views

(4.1 -> 4.2) Attempted to load class TemplateComponent from namespace Joomla\Component\Administrator\Extension calling $app->getTemplate

I have a file test.php that manually loads the Joomla framework and prints template parameters. <?php // test.php, located in the same directory that index.php is define('_JEXEC', 1); define('...
toblerone_country's user avatar
2 votes
2 answers
151 views

Can we get the featured articles in a GET call through Joomla 4 API?

For now we have api/v1/content/articles, but this gets ALL the articles from the site. I do not need the whole list, just the featured articles. Will we need to create an api-component as a temporary ...
Carlitorweb's user avatar
1 vote
2 answers
136 views

Identify Joomla 4 API access

If I do an API call like this: curl --location --request GET "http://127.0.0.1:8000/api/index.php/v1/users" --header "X-Joomla-Token: xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx" I get ...
maidan's user avatar
  • 383
1 vote
2 answers
120 views

Webservices Route

If I create Route for the API via $router->createCRUDRoutes( 'v1/foos', 'foos', ['component' => 'com_foos'], true ); Like explainded in https://joomla.stackexchange.com/a/32322/7387 the Route ...
agi's user avatar
  • 303
4 votes
2 answers
379 views

Joomla API and Credentials

I am taking my first steps in integrating the Joomla API. I used this tutorial: https://blog.astrid-guenther.de/en/joomla-webservices/ Now I am wondering if it is really necessary to include the ...
agi's user avatar
  • 303
1 vote
0 answers
63 views

I can't get $params->set() to work to transfer variable from module to template

I'm trying to get a variable from my module to my template but its not working. In my modules xml I defined: <fields name="params"> <fieldset name="basic"> &...
Jonathan Schmidt's user avatar
4 votes
3 answers
834 views

Joomla 4 API Question

How to convert a custom Joomla 3 to Joomla 4, and use the Joomla 4 web services API? I have an extension I wrote for J3 and with a bit of tweaking it works just fine in J4. I want to add web services ...
Terry Carter's user avatar
  • 1,812
1 vote
1 answer
61 views

Joomla 4 API Issues using Joomshaper Melvin Template

It may be too specific a question, but is anyone having any issues utilizing Joomla 4 Templates and the API with extensions from Joomshaper? I have 1 site that seems to work fine, but another that is ...
Terry Carter's user avatar
  • 1,812
0 votes
1 answer
88 views

Displaying API data in Joomla Component

So, this is a two parted question but both pertaining to REST APIs. I am developing a component for Joomla in which I have a few database fields (ie. teamid and platform) that are stored in the local ...
Brandon's user avatar
  • 69
2 votes
1 answer
119 views

Is showing a Joomla API token in JS a security risk?

I have created a couple of web services under Joomla 4 that are simple enough calls to the same website to refresh a couple of fields when something else changes. In my JS code I have the 'X-Joomla-...
Irata's user avatar
  • 3,597
1 vote
1 answer
132 views

cant display simple text onContentPrepare

I just want to display simple text and this is not working. I don't know is there a way to see something like log to see what happens in the background? public function onContentPrepare($context, &...
Husen's user avatar
  • 11
1 vote
0 answers
137 views

getting first image of article for open graph

I've been a PHP developer for long time, but I am new to Joomla. On a Joomla 2.5 project, I need to make open graph meta tags. As a part of open graph meta tags, I need to find first image of article. ...
shekoufeh's user avatar
  • 121
2 votes
2 answers
382 views

Integrate external news content API into com_content articles

My client is looking to integrate news content coming from an external API into their Joomla website. The API is in the JSON format and includes multiple fields like title, summary, date, and full ...
Mike Hermary's user avatar
1 vote
1 answer
623 views

Joomla 4 - get module params in external php

In Joomla 3, I get module params with this code: // Create the Application $app = JFactory::getApplication('site'); $module = JModuleHelper::getModule('mod_dev'); $presetParams = new JRegistry($...
Peter Reill's user avatar
2 votes
1 answer
302 views

Are custom fields updatable using joomla 4 api?

Simply put when using the API to update a custom field of an article, the new information is not successfully passed through. Furthermore, the original contents are deleted from the field. The ...
Malkio's user avatar
  • 45
1 vote
1 answer
159 views

J4 API - There are two variables for Article Text, why do neither work on PATCH?

While working with the new Joomla 4 web services API. The Article text does not update. Additionally, as per the documentation, when creating an article via API the article text variable is ...
Malkio's user avatar
  • 45
4 votes
2 answers
494 views

Is Joomla4 API/Web Service ready for production use?

I've read what little I can find about J4 Web Services, but cannot find a working example or get my code to work. The code below should work by all accounts, but I get forbidden on my local machine ...
GDP's user avatar
  • 7,715
1 vote
2 answers
179 views

How to create joomla plugin with jquery code

What is the best way how to add jquery code by Joomla plugin? How can I set that these code should be applied just for checkout page of VirtueMart in xml file? Is this the best way? <?php // no ...
user2623507's user avatar
0 votes
1 answer
157 views

Upload single or multiple files replacing deprecated JRequest::getVar('file', '', 'files', 'array');

I am trying to upload a single or array of files and am not sure how to use the jinput with the array and filter. Tried multiple suggestions from here and documentation and cannot make it work for me. ...
Scott Smith's user avatar
1 vote
1 answer
197 views

What is the correct way to use appendBody

I'm trying to understand appendBody First of all append would seem like it comes after the </body> but I assume it can only mean after the contents of the body. And prepend before the contents ...
Eoin's user avatar
  • 1,889
2 votes
1 answer
76 views

Reset list option-value when changing showon value

I am currently writing a module with many backend settings, some of these use the "showon" attribute. For example: I have two fields of type "list". In the second one, the options ...
JulSch's user avatar
  • 21
0 votes
0 answers
163 views

Adding Azuracast JSON file to my AM HTML5 AUDIO PRO PLAYER in joomla

I need help for a problem that i didn't found solution. we have a web radio created with joomla and we start to put our programs 24h/24. I bought an AM HTML5 AUDIO PRO PLAYER and everything work fine ...
Ahmed Boudraa's user avatar
3 votes
2 answers
112 views

What does it mean for a user to be 'logged in' to Joomla?

I am having an issue with the ACL of my Joomla API. I created this using the TechJoomla api component. I have the following code to handle post requests on my api. <?php use Joomla\CMS\...
Huw Evans's user avatar
  • 371
2 votes
2 answers
698 views

What is url for calling task in controller for Joomla 4?

This is my ajax query for calling a task in the controller (it works for Joomla 3 but doesn't work for Joomla 4): $.ajax({ type: "POST", url: "index.php?option=com_scrib&...
waxman's user avatar
  • 21
1 vote
1 answer
129 views

Router, keep only item alias in SEF URL

For a particular reason, I need to keep in the SEF URL only the alias of the item to have a URL like this www.mywebsite.com/**myItemAlias** but of course without creating a direct menu to the item ...
Laurent's user avatar
  • 23
1 vote
1 answer
261 views

How can I make a custom controller for a Joomla based api?

For my latest project I need an api that responds to a 'POST' request by returning json text that depends on the content of the 'POST'. I have made a version of this in loopback, however I can't think ...
Huw Evans's user avatar
  • 371
0 votes
0 answers
37 views

Assign a template to a category with a plugin system and onAfterInitialise event

I would like to assign a specific template for a certain category, I have tried with this code in a plugin system but without success (this code does not include the condition for the category I will ...
Laurent's user avatar
  • 23
2 votes
1 answer
118 views

Impossible to create new Joomla User with User Class : Please enter your name

Dont' know why but since Joomla 3.9.22 (or 3.9 ?), when I create a User with User Class, I have the error "Please enter your name". But the name field is not empty. Here is my simple code : $...
spiNOops's user avatar
1 vote
1 answer
312 views

Does Joomla CMS or Joomla Framework provide any Class for making POST request to an external API?

I came across: the documentation for Joomla's HTTP client class and joomla/http in packagist Are they the same thing? Are these capable of sending POST requests to an external API?
shenkwen's user avatar
  • 1,379
1 vote
1 answer
120 views

HTMLHelper::isRegistered what is it used for?

In Joomla's profile plugin, I came across these lines of code if (!HTMLHelper::isRegistered('users.url')) { HTMLHelper::register('users.url', array(__CLASS__, 'url')); } ...
shenkwen's user avatar
  • 1,379
0 votes
1 answer
200 views

Joomla custom SSO plugin

I need to create a custom SSO plugin. The way it should work is: User authenticates on 3rd party application 3rd party application calls a Joomla URL via POST request The URL that has been hit deals ...
Kabal's user avatar
  • 1
1 vote
0 answers
52 views

Upload and attachement for phpmailer

hello i starting an code to allow sending file via a form i create an input file field <input type="file" name="'.$field_name.'[]" accept="'.$values_field[0].'" id="'.$field_id.'" '.$placeholder.' ...
user2822359's user avatar
0 votes
1 answer
285 views

Joomla post requests

I'm trying to make an android application and so i want to connect it directly to my Joomla website, i want to send some post requests but they are getting denied, I'm not asking for any help ...
user71381's user avatar

1
2 3 4 5