Skip to main content

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
21 views

Plugin/Module Development - How to stop all further processing?

So, I want to write a plugin/module that, when certain requirements are met, the plugin stops all further processing and returns a blank page. For my needs, the use case for this can be one of two ...
ppetree's user avatar
  • 101
1 vote
0 answers
31 views

Not able to connect to Joomla core APIs in Joomla 4.x upgraded from Joomla 3.x

We had recently upgraded our Joomla site from 3.x to 4.x. We now have a requirement to connect to Joomla core APIs. But we are not able to do so. It is giving error: Unable to load router: api .../...
user2421690's user avatar
0 votes
1 answer
202 views

implode(): Argument #1 ($array) must be of type array, string given

On a site for certain articles (and not others!!) I have the following error message * This worked in j3/php7.4. Perhaps a problem comes from switching to j5 / php8.1 What's strange is that it works ...
Hdcms's user avatar
  • 51
0 votes
1 answer
28 views

How to integrate Nicepage site on Joomla

I am kinda new to this whole website thing. Definatly dont have much experiance in coding ect, but I have created a whole website with a nicepage paid subscription. I downloaded Joomla and XAMPP. I ...
Shelby's user avatar
  • 1
0 votes
0 answers
25 views

Problem setting image info when creating an article via the J4 REST API

I’ve been using the J4 REST API for a while to create articles from form data through the Webhook feature of the Convert Forms extension. It works great for both standard article fields and for ...
Jeff Gilmore's user avatar
1 vote
2 answers
66 views

Component middleware for handling URLs

I have a component com_something that I am developing. Whenever a user goes to any view in this component (i.e. when the URL starts with index.php?option=com_something), I want to check the URL for a ...
toblerone_country's user avatar
1 vote
1 answer
74 views

API access without accept header

So this issue has already been noticed here: https://github.com/joomla/joomla-cms/issues/39332 My component gets accessed via the API by a big company who is using the same access with hundreds of ...
maidan's user avatar
  • 463
0 votes
1 answer
52 views

API Token alternative for inside request header

So the X-Joomla-Token with the API Key is added to the Request Header upon starting a request. I have a partner that needs to access the API but is due to his infrastructure not able to add the Token ...
maidan's user avatar
  • 463
0 votes
1 answer
57 views

Show the category custom fields in article page

I have category custom fields and I need to show these in the article (which is in the category) view. I have used the following: use Joomla\CMS\Factory; use Joomla\Component\Fields\Administrator\...
RustyJoomla's user avatar
  • 2,078
0 votes
1 answer
80 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
  • 169
1 vote
1 answer
42 views

Grant access to Joomla API from just one site

In Joomla Joomla 4/5: What is the best strategy to allow access to Joomla API endpoints from only one (or more) specific domains? And how is this configured in Joomla 4/5? (CORS vs. HTTP-Header-Plugin ...
cappu's user avatar
  • 169
0 votes
0 answers
27 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
2 votes
1 answer
230 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
  • 169
0 votes
1 answer
100 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
  • 169
0 votes
1 answer
61 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
75 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
41 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
546 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
3 votes
1 answer
170 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
  • 33
0 votes
1 answer
87 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
34 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
  • 463
0 votes
2 answers
305 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
42 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
  • 463
1 vote
2 answers
113 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
  • 463
1 vote
1 answer
270 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
  • 4,301
2 votes
1 answer
135 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
939 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
226 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
2 votes
2 answers
196 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
  • 463
1 vote
2 answers
156 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
  • 323
4 votes
2 answers
566 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
  • 323
1 vote
0 answers
66 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
4 answers
1k 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,834
1 vote
1 answer
70 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,834
0 votes
1 answer
130 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
3 votes
1 answer
142 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
  • 4,301
1 vote
1 answer
158 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
  • 111
1 vote
0 answers
168 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
480 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
742 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
357 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
194 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
566 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
197 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
180 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
226 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
  • 2,033
2 votes
1 answer
81 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
209 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
120 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
896 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
2 3 4 5