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

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
22 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
17 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
57 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
0 votes
0 answers
60 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
  • 423
0 votes
1 answer
39 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
  • 423
0 votes
1 answer
40 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
61 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
36 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
  • 139
0 votes
0 answers
24 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
150 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
78 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
39 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
45 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
28 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
278 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
124 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
65 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
33 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
  • 423
0 votes
2 answers
253 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
  • 423
1 vote
2 answers
106 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
  • 423
1 vote
1 answer
166 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,927
2 votes
1 answer
129 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
805 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
192 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
166 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
  • 423
1 vote
2 answers
138 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
475 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
65 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
959 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
67 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
110 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
130 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,927
1 vote
1 answer
149 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
157 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
425 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
688 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
338 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
175 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
535 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
194 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
172 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
211 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,909
2 votes
1 answer
79 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
188 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
117 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
798 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
137 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
285 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

1
2 3 4 5