Questions tagged [custom-component]
For questions related to custom component development
282
questions
0
votes
1
answer
32
views
Custom Component Error on Save / Edit: Save failed with the following error: Prepared statement needs to be re-prepared
I have here a really curious issue in Joomla 5.0.0 on a custom component I'm building right now. In one of the views i cannot save edits on existing elements (create new elements is not an issue at ...
1
vote
1
answer
37
views
Export as Excel with PHPSpreadsheet as download how to keep Joomla Messages?
In my custom Joomla 5 component I've added PHPSpreadsheet via composer. In the Export View (Backend) i have a small adminform for setting up the export and a submit button that toggles the download by ...
0
votes
0
answers
25
views
J5. Activate Tab key and Indent in Codemirror in custom component
Codemirror v6 looks like not so easy to configure as previous versions. In my custom component I get codemirror editor with this code who use for options sintax like v5:
$editor = Editor::getInstance('...
0
votes
1
answer
55
views
How to use Joomla.listItemTask in Custom Component
Hi i need an example on how to implement a simple on / off toggler in a Joomla 4/5 Custom Component's list view.
I've tried the following code but i did not get any reaction in the model / idk how to ...
0
votes
1
answer
62
views
how to update item by using ajax on custom component joomla 4
Dears
My component was a bit old. So I started to do it again on joomla 4. I have been looking for a few days, how to update or create data items by using Ajax in joomla 4.
i found a lot of feedback ...
0
votes
1
answer
19
views
Set Field Value in Custom List field that is used inside a extended SubformField Class in Multiple Mode
My brain hurts,
I'm using a custom listfield inside a subform in multiple mode, the rendering works as expected (two elements in database > two elements in the form). but i'm not able to set the ...
0
votes
1
answer
102
views
Joomla 4 Custom Component > Custom Fields Integration
I'm curently developing a (free) Custom Joomla 4.x component. Now im struggeling while implementing Custom Fields support for my first (and currently only) context. The issue is that the "Fields&...
0
votes
2
answers
73
views
J4 Component: Add Modified By and Modified On Database Record when using JForm and an AdminModel Model
I am creating a new Joomla J4 component for my website. I have previously created components in J3 using Akeeba's Framework on Framework. For J4 I'm working to learn how to create a J4 MVC native ...
0
votes
0
answers
48
views
How to resolve the Internal Server Error with my custom components calendar in Joomla 4?
I try to make a custom calendar in my custom component in Joomla 4. For that I write a code who connect to a database and retrieve the data. For that I have 3 files : default.php, ...
1
vote
0
answers
33
views
Different results on localhost than on remote site
I get the following error on my remote site (hostgator), but not on my local localhost site. It only happens for the component I am developing, not for the native banners or contacts components.
...
0
votes
1
answer
67
views
Joomla 4: Adding category parameter(s)
How do I get the solution for this https://stackoverflow.com/questions/18975896/adding-category-parameters to work on Joomla 4?
My extension includes various categories, which I've named "[...
1
vote
1
answer
53
views
How to register {my namespace]\Site\Service\Category?
My component is using Joomla Categories and I'm using the following code to fetch a category:
$component = Joomla\CMS\Factory::getApplication()->bootComponent('com_khub');
$category = $component-&...
1
vote
1
answer
49
views
Error: The form "adminForm" is required to perform the task, but the form was not found on the page
I'm developing a component. At admin at the list of item, I get this error when I click on the + New button:
[Error] Error: The form "adminForm" is required to perform the task, but the form ...
1
vote
2
answers
58
views
Link to component appears empty
I created a simple component, which appears as expected at the admin side.
If I link the component using a menu item, everything seems to be finde. Component appears in selector, component's views ...
1
vote
0
answers
41
views
Joomla 4 not unzipping custom component update package
I have developed a custom Joomla 4 component called "com_news" and successfully implemented the update functionality before. However, now I am encountering an issue where Joomla can't unzip ...
0
votes
2
answers
303
views
Joomla 4 Upgrade issue with custom component
I have a custom component that I've inherited. I've upgraded the site to Joomla 4 with no problems but when going to the frontend, am getting an error:
Fatal error: Class CloudCardModelCard contains 1 ...
1
vote
1
answer
27
views
Display only one Category and its sub-categories
I have created a custom filter.xml to search for specific documents.
Using Joomla's category system, I have also create 3 main categories. Courtrolls, Newsletter and communique.
In my filter form, I ...
0
votes
1
answer
144
views
Custom component categories missing after upgrade from 3.10 to 4.x
I have a custom component that integrates com_categories in it, after upgrading from joomla 3.10 to 4.x, and fixing all the errors of my component on joomla 4.x, when accessing the categories menu, ...
4
votes
0
answers
633
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('...
0
votes
1
answer
44
views
How to return Http 401 on Joomla Administrator for an unauthenticated user?
everyone
How can I have /administrator/index.php?option=COM_MYCOMPONENT&controller=MYCONTROLLER&task=MYTASK return a "401 Unauthorized" HTTP error instead of redirecting to the ...
0
votes
0
answers
40
views
How to build an Imagefield like string in PHP
I want to use Joomla's way to handle images in my component. My component offers a field to select a folder where some images are stored (used as gallery upon the related item). In dev everything ...
0
votes
1
answer
36
views
Proper way to access Component config from API?
I am building a custom admin component for Joomla!4 that includes an API.
To access the component's config I am using, on the API Controller file:
$params = ComponentHelper::getComponent('...
1
vote
1
answer
52
views
Custom J4 Component - Multiple Models & Different Category "Groups"?
I have a Custom J4 Component that should have different types of contents. So called "items" and "packages". The items are done so far and using the default J4 categories via "...
0
votes
1
answer
24
views
Custom J4 Component Problems with Multilingual Associations: Edit Associations
I've on the way to create my first native J4 Component by using Astrid's Tutorial (Link) - I've already figured out that some of the code parts are not fully J4 conform, but i was able to "update&...
1
vote
1
answer
71
views
Backend modal toolbar button that gets activated when list item selected
Creating a Toolbarbutton which needs a selected list item for dropdown:
$childBar->standardButton('delete')->icon('icon-arrow-right')->text('delete')->task('delete')->listCheck(true);
...
2
votes
1
answer
574
views
J4 component URL not SEF
Context: I have a component that works fine in J3 and I want to migrate it to J4.
Problem: When I create a menu (Joomla main menu) on the frontend view of the component, in J4 only, the URL is not SEF ...
2
votes
2
answers
272
views
How to create a (better) development environment for Joomla 4
I have been writing a custom joomla 4.x component. It's not working. But rather than getting people here to debug my code I want to know how to set up a proper development environment that will give ...
0
votes
0
answers
18
views
modal popup just after login
I am new to the Joomla world and I have to face a difficult problem.
I have to make sure that immediately after logging in to the user, a modal popup with a select box is proposed.
The content of the ...
2
votes
2
answers
48
views
Custom admin menu creation - parent_id and level values are resetting to zero
I want to programmatically create some admin menu items for my component and I'm most of the way there, but I can't seem to set the hierarchy for them. I am wanting three menu items - one as the ...
2
votes
1
answer
139
views
How does a custom component store config.xml information
I've been developing a custom component on Joomla 4 for a few months now and I've finally got round to working on the access and permissions side of things. Whenever I try to access the Options for my ...
2
votes
1
answer
200
views
Joomla 3.x routing and slug problem
I have 1 component with 2 views - default is view1 - secondary is view2.
When I associate it with the menu from the backend, Joomla creates the correct url with alias for SEO.
Example: www.sitename....
0
votes
2
answers
169
views
How to set error in component code for FormController
I'm creating a custom J3.x component.
I'm manually adding my own error notices where needed via
JFactory::getApplication()->enqueueMessage()
However, when a record is not saved by my component, ...
1
vote
1
answer
59
views
What is the best way to have pages displaying articles from our custom content table in Joomla 4.1?
Related: Is it possible to make it so that authors can edit their own published articles creating a new unpublished version of them?
The answer to that question is "In Joomla 4 it is, but authors ...
3
votes
1
answer
33
views
Is there a functional reason for the naming convention for custom actions?
I'm writing a component for which I'd like to implement some additional restrictions on actions. For example, I want administrators to be able to view user details, but restrict some sensitive ...
0
votes
1
answer
36
views
URL doesn't recognize view after slash in custom component
The view in my custom component is no longer recognized in Joomla4 when passed as, for example, mycomponent/view/anotherinfo.
In Joomla3, this worked normally. What happened? What do I need to change ...
1
vote
0
answers
26
views
Create a public controller method
I have a controller method that outputs some JSON which should be publicly accessible
index.php?option=com_mycomponent&task=mycontroller.json&format=json
If I set this as a System > URL ...
4
votes
3
answers
688
views
New files in Joomla 4 components
In Joomla 4 there are new files in the components, like:
services/provider.php
Extension/XxxComponent.php
Service/HTML/AdministratorService
Are there available documentation about how to implement ...
2
votes
0
answers
62
views
Authenticate Http request
I'm trying to POST from one controller method to another with the Http class.
$http = new Http();
$url = Uri::base().'index.php?option=com_mycontroller&task=my_method';
$response = $http->post($...
1
vote
2
answers
40
views
Forwarding to the item page after the creation of the item via front end editing
I wrote a small joomla 4 component and made it possible to create a new item in the frontend.
After creating a new item, Joomla core components usually redirects to a list view. But I want to redirect ...
2
votes
1
answer
285
views
How to get Joomla article association?
How can I get the associated articles programmatically in my custom component function?
I have my custom component and I am creating a new article for a multilingual site, so I need to associate ...
1
vote
0
answers
28
views
Retrieving state variables using Ajax in 3.10.4
I have a site which displays a directory of registered users on the frontend. I've allowed users to select topics of interests when they're registering. In the directory they then can search by names ...
1
vote
1
answer
77
views
Custom fields for different table structures in custom component
I'm trying to use custom fields on my component. That works fine so far, but I have multiple data structures (tables) in my component, where I want custom fields to work.
Everything works when ...
2
votes
1
answer
316
views
Invalid controller class from custom component ajax call to json method
I have an existing J3 component admin view which fires off a Javascript Ajax call to a Json controller and fetches back data which I then incorporate into that view. I'm trying to replicate how I've ...
1
vote
1
answer
243
views
Render Custom Fields in Admin edit view
I want to add custom fields to my component. My admin edit view uses bootstrap tabs:
<?php echo HTMLHelper::_('uitab.startTabSet', 'myTab', array('active' => 'general')); ?>
<?php echo ...
0
votes
1
answer
277
views
Joomla 4, Error: Class '...\Component\...\Administrator\Model\SimpleXMLElement' not found
Please tell me what the problem may be. I adapt the component for Joomla 4. I get this error, although everything should work.
Class '....\Component\....\Administrator\Model\SimpleXMLElement' not ...
1
vote
1
answer
209
views
Where do I add php code to submit an HTML form?
I am new to Joomla, and so far, I used the basics to make a simple website. I decided to try out making a component, using JCB, that has a database of a list of items, and for each item, there is a ...
0
votes
1
answer
155
views
Multiple components on a single page
Is it possible to show multiple components on a single page in joomla?
I have 2 menu items, each one shows a different component, i want to show them both on the same page, is it possible?
3
votes
1
answer
864
views
'getErrorMsg' is deprecated in Joomla 4 and what would be the equivalent
In my custom Joomla component, I got the below code
$db = Joomla\CMS\Factory::getDbo();
//some code
if (!$row->bind($this->_formdata)) {
if($db->getErrorMsg()){
//do some code
}
...
0
votes
1
answer
766
views
'JModuleHelper' is deprecated in Joomla 4 and what is its equivalent
I am using the below joomla code in my custom component.
$module = JModuleHelper::getModule('mod_mycustommodule');
$moduleParams = new Joomla\Registry\Registry($module->params);
It seems '...
4
votes
1
answer
3k
views
'JEventDispatcher' is deprecated in Joomla 4 and what is the replacement
I am using the below code in my current Joomla custom component
Joomla\CMS\Plugin\PluginHelper::importPlugin('captcha');
$dispatcher = JEventDispatcher::getInstance();
$res = $dispatcher->trigger('...