Skip to main content

Questions tagged [custom-component]

For questions related to custom component development

Filter by
Sorted by
Tagged with
0 votes
1 answer
568 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
37 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 ...
4 votes
0 answers
848 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
64 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
1 answer
23 views

J5 - Utilising com_fields in component

I'm lost with utilising com_fields in my component so that my users can create a custom field for a specific purpose and have it rendered in a modal popup. So I have my component setup with a ...
2 votes
1 answer
244 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
78 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
88 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
278 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
2 answers
163 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
344 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
180 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
38 views

Component with a module included - JED Checker

I recently ran all my components through the JED checker to bring them up to speed with J6 in mind. Some of my components have a module and/or plugin included in the main component manifest which has ...
1 vote
1 answer
232 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
2 answers
99 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
251 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
0 answers
17 views

Joomla component detail view error: 404 Could not load the item

I have a table named edu2f_jobs_jobs. This table is received here: public function getTable($type = 'Job', $prefix = 'Administrator', $config = array()) { return parent::getTable($type, $prefix, $...
0 votes
1 answer
131 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&...
2 votes
1 answer
52 views

Add Tags Feature to Custom Component

Knows someone a good guide on how to implement the TAGS feature into a Custom J4/5 Component? I have this information from Astrid's Book on how to develop J4 Components but it looks not fully correct ...
0 votes
1 answer
83 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 ...
1 vote
2 answers
64 views

For how long will legacy component MVC structure work in Joomla?

Legacy component MVC structure: com_foo |- controllers | |- foo.php |- helpers | |- foo.php |- models | |- forms | | |- foo.xml | |- foo.php |- views | |- foo | | |- tmpl | | | |- default....
2 votes
2 answers
302 views

Select articles to display in custom component

I have a custom component where I was to be able to select other articles to show in the frontend. I have thought the best way to do this would be through the SQL field. This is good that it gives me ...
1 vote
2 answers
70 views

Best way to save timestamp for new or modified records in custom component

In my custom component I have two database tables for items in my component with the standard 'created' and 'modified' datetime columns to contain timestamps when those items are created or modified. ...
1 vote
2 answers
651 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', '{...
2 votes
3 answers
373 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
2 answers
58 views

Store Custom Subform Field Value in DB

Note This is a follow up question upon Create Custom Form via SimpleXMLElement The first issue has been solved, the subform gets rendered, here is my CustomField Code: use Joomla\CMS\Factory; use ...
0 votes
0 answers
19 views

Custom Component - Cannot switch category after implementing Custom fields

Another weird issue in one of my comppnents i did not understand. I have implemented custom categories by using com_component.teams and com_component.locations - Additionally. it works all fine until ...
0 votes
1 answer
56 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
336 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
56 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
54 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
68 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
23 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
167 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 ...
5 votes
3 answers
772 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
174 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
111 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
56 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
142 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
35 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
479 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
82 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-&...
2 votes
1 answer
78 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
82 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
48 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
462 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
30 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
799 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
165 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, ...
0 votes
0 answers
43 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 ...

1
2 3 4 5 6