Questions tagged [custom-component]

For questions related to custom component development

Filter by
Sorted by
Tagged with
0 votes
2 answers
38 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, ...
user avatar
1 vote
1 answer
41 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 ...
user avatar
3 votes
1 answer
32 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 ...
user avatar
0 votes
1 answer
11 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 ...
user avatar
1 vote
0 answers
13 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 ...
user avatar
  • 131
3 votes
2 answers
104 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 ...
user avatar
  • 207
2 votes
0 answers
37 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($...
user avatar
  • 131
1 vote
2 answers
27 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 ...
user avatar
  • 31
0 votes
0 answers
16 views

Predefined List form field type php class location / registration

I'm trying to set up a Predefined List form field type as per the docs here https://docs.joomla.org/Predefined_List_form_field_type I have the XML <field name="_card_expiry_year" type=&...
user avatar
  • 131
2 votes
1 answer
77 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 ...
user avatar
0 votes
0 answers
20 views

Rendering fields of custom subform in individual layout

So inside a custom component (com_mycomp), i need to output the single fields of a subform field custom arranged. Sounds simple, but I can only get it to be rendered in default vertical order. I can't ...
user avatar
  • 81
1 vote
0 answers
16 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 ...
user avatar
  • 173
1 vote
1 answer
29 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 ...
user avatar
  • 81
2 votes
1 answer
53 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 ...
user avatar
0 votes
0 answers
22 views

Workflow implemented in 3rd party component

I have a simple component that enables me to record time against an activity for a specific user record (client) and during my upgrading this component to J4 I thought I would learn how to implement ...
user avatar
1 vote
1 answer
57 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 ...
user avatar
0 votes
1 answer
65 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 ...
user avatar
  • 111
1 vote
1 answer
63 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 ...
user avatar
  • 11
0 votes
0 answers
25 views

Component submenu - hide according to access / ACL / permissions

Currently working on making a custom extension of mine compatbile with Joomla 4. Part of that, I am finally pulling the plug on using JHtmlSidebar::addEntry($name, $link, $active). Main reason being, ...
user avatar
  • 153
0 votes
1 answer
62 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?
user avatar
  • 3
1 vote
1 answer
255 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 } ...
user avatar
  • 2,651
0 votes
1 answer
204 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 '...
user avatar
  • 2,651
1 vote
1 answer
743 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('...
user avatar
  • 2,651
0 votes
1 answer
26 views

Visual code is unable to identify method inside model

I am using Microsoft Visual Code for custom Joomla development. The below code is from one of the controller php file. Public function savecontact(){ Joomla\CMS\Session\Session::checkToken() ...
user avatar
  • 2,651
1 vote
0 answers
38 views

Using sql field in custom component

I have a custom component, it allows admins to select a related content article from the #__content table using the following: <field name="relatedcontent" type="sql" default=&...
user avatar
  • 1,992
2 votes
1 answer
29 views

Show more than two values from array

I have the following fields in a component: <fieldset name="carousel_container"> <field name="carousel" type="Repeatable" icon="list" description=&...
user avatar
  • 1,992
1 vote
0 answers
42 views

Codeception Acceptance Testing issue using session snapshot

I think i read almost all similar reccources considering this issue, but nothing helped so far. I am moving our Codeception tests on Github Actions. The whole build process is running but the ...
user avatar
  • 331
1 vote
1 answer
52 views

Show images and caption from array as images in carousel

I have the following fields in a component: <fieldset name="carousel_container"> <field name="carousel" type="Repeatable" icon="list" description=&...
user avatar
  • 1,992
2 votes
1 answer
71 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 ...
user avatar
  • 1,992
1 vote
1 answer
38 views

Codeception Acceptance Test Issue with JoomlaBrowser

When trying to write a simple Acceptance Test only creating a new Joomla Article Blog Menu Item, I'm doing this: $I->createMenuItem('Blog', 'Articles', 'Category Blog', 'Main Menu'); I get this: ...
user avatar
  • 331
0 votes
1 answer
69 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&...
user avatar
  • 1,992
1 vote
2 answers
97 views

How to use SQL statements not supported by JDatabaseQuery

Recently, I have needed to use some SQL statements that are not supported by the JDatabaseQuery class, specifically REPLACE INTO and INSERT IGNORE. The only way that I am able to get something to ...
user avatar
  • 2,220
2 votes
1 answer
147 views

How to open a new window/tab or modal from within a component

I am trying work out how I can pop up a modal or open a new window or tab when selecting a button on a form that processes the form and passes to another extension? I can't seem to find any examples ...
user avatar
  • 2,220
1 vote
2 answers
523 views

Best practices for Joomla - Get another model in a view from another controller

I need to get data from another model than the view specific controller/model into the view. But I'm not sure if the way I'm doing it now is correct. I do that via the following way in the view.html....
user avatar
  • 325
1 vote
1 answer
140 views

JTable, new row doesn't get inserted with table->save method

I'm trying to insert a row with the table->save() method, but the method executes an UPDATE instead. There is no row available, so it needs to be inserted. Does anyone know how to get it inserted? ...
user avatar
  • 325
1 vote
2 answers
78 views

Controller method does not get data passed through jQuery.ajax()

I am developing a Joomla component. In javascript I use jQuery.ajax() for making a (php) controller method put data (from javascript) into the database. However, after installing the component on one ...
user avatar
  • 111
0 votes
1 answer
181 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 ...
user avatar
1 vote
0 answers
26 views

Form With Buttons That Don't Submit Data

I am trying to make a page that performs various functions in vanilla Javascript. One of the functions involves submitting form data to Joomla. However the issue I have is that Following the following ...
user avatar
  • 249
0 votes
1 answer
29 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 ...
user avatar
0 votes
1 answer
57 views

Get the link to the item in the backend edit view of that item

Let me explain. I have created a custom component, when editing the element and saving it once, I would like to display next to the alias the sef frontend link to this element. Here is a screenshot to ...
user avatar
  • 23
1 vote
2 answers
415 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 ...
user avatar
0 votes
0 answers
43 views

How can I get the values of the form on my admin page

I have a form on my admin page of my component, and I can edit the fields and save them. When I load the page the saved fields show. Say for example in a blog_category menu item. I create a new menu ...
user avatar
  • 1,829
0 votes
3 answers
257 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', '{...
user avatar
  • 1,369
2 votes
1 answer
512 views

Joomla 3.9.19 get the constants from global configuration in component display function

I have created a component and need to get a constant value in the component administrator and list the item according to it. I have tried different ways to get the constant value in the display() ...
user avatar
1 vote
1 answer
88 views

Sharing a MVC resources library between two components

Lets say my component is called dumbo. It contains all kind of MVC stuff and works well. Now i have a second component that is called jumbo. I need both components to share some models, controllers ...
user avatar
  • 331
0 votes
1 answer
30 views

Component development, on installing an update, should/could J! ignore some database errors?

While developing a component the database can go through many changes. Updating the component then either goes through many schema update files, or causes problems. Re-applying a database change file (...
user avatar
  • 113
1 vote
1 answer
287 views

Using form XML for custom filter and removing group definition

I'm creating a small component with a search module. I will dumb this example down so that the question will be clear. The component manages books. The book form XML looks like this and its structure ...
user avatar
  • 331
0 votes
1 answer
266 views

Where do I define custom global variables in my Joomla project?

I'm using Joomla 3.9.18 and I've got a project including a component and a couple of modules. I've got a couple of variables that are the same throughout the whole project (like some prefixes and a ...
user avatar
0 votes
1 answer
68 views

How to install custom component sample data?

I have a custom component for Joomla. I understand how to install some data using the sql file of component. Now I want to add some data to the database tables in a separate package. I can't find any ...
user avatar
  • 213
4 votes
2 answers
303 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 ...
user avatar
  • 3,501

1
2 3 4 5 6