Questions tagged [custom-component]

For questions related to custom component development

Filter by
Sorted by
Tagged with
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
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, ...
0 votes
1 answer
123 views

Trying to add subform field to existing component xml

I've added the following into my components XML file : <field name="activity_name" type="subform" label="Activity" description="" multiple="true&...
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('...
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 ...
0 votes
1 answer
81 views

Custom module doesn't work, messing up all page, messing up editor

I am using Joomla! 3.7.5 and JA Builder. I'm trying to create a block with custom module. Once I create it, paste code and assign position, then in page editor add block with widget - position and ...
0 votes
1 answer
524 views

Call a function using AJAX from a Joomla-View to retrieve data from the DB

i have coded a little component to administrate books for a histroy club. I added some views to deiplay different tables with book date. So far everythign works. In fact the DB access and the building ...
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
2 answers
564 views

What is the proper way to use content.prepare?

I am trying to put a module inside another component. According to https://www.joomlashack.com/blog/joomla-how-to/module-position-component/ I can put <?php echo JHtml::_('content.prepare', '{...
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 ...
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 ...
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
1 answer
76 views

SEF url and custom view

Was able to create a custom component and a custom view which I went ahead and attached a js library to. Now to achieve my desired functionality I need to create a custom url(SEF) in my route.php file,...
2 votes
1 answer
83 views

Is it possible to create a component "addon"?

I've created a component for handling a multitude of things for my clients, but I frequently get feedback that certain sections aren't needed or that additional sections are desired. The first ...
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
75 views

Getting Editor to show on front (site) of website

I'm trying to display to users an editor in the front end of my website (in a logged in area) I have: // IMPORT EDITOR CLASS jimport( 'joomla.html.editor' ); // GET EDITOR SELECTED IN GLOBAL SETTINGS ...
0 votes
2 answers
155 views

Custom Component - Copy / Archive record when values change

For a custom component, I want to incorporate a way of keeping track of changes made to records in specific tables. For example, when the mileage value of a car is changed, the record having the old ...
1 vote
1 answer
308 views

Load language files inside custom library

I have a a library inside \libraries\mylib\. That library contains an include.php which uses following to load language files that are also inside a /language folder in the library: $lang = JFactory:...
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
157 views

How to override "Select an option" header for SQL and list fields

In my custom component, inside the forms, I have several list fields. Some are normal list fields, others are sql fields. All of these show "Select an option" as a header. I can't find the way 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 ...
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 ...
5 votes
3 answers
770 views

Custom component: Export items to CSV -> Changing searchbar causes a new download

I would like to export all selected items from the items-view of my component. To do so I modified my view and inserted a new button to the JToolBarHelper::custom('items.exportcsv', 'download', '', ...
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, ...
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
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.  ...
4 votes
2 answers
425 views

Front End Management of Joomla Users

Joomla 3.9.20 I know there's no default way of managing Joomla users on the front end (a huge drawback of Joomla imo). There appears to be some commercial extensions and components that do this, but ...
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 ...
1 vote
2 answers
728 views

How to dynamically reload admin-form-fields in Joomla

In a custom component, I'm developing an admin form with 2 fields, a combo-box for jobTitles and checkboxes for technologies. Both fields are loaded from a database table. The values of the checkbox ...
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
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 "...
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 ...
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&...
4 votes
1 answer
148 views

How can I clear the cache for the params of a custom component?

I am working on a custom component and it works as intended as long as I do not have cache enabled. In the admin section of the component, I have a view that can change the "component params": $...
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 ...
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
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
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 ...

1
2 3 4 5 6