Questions tagged [custom-component]

For questions related to custom component development

Filter by
Sorted by
Tagged with
0 votes
1 answer
183 views

How to add js library on component installation

I have component which needs a slider. I`ve chosed carousel but how to add it in the frontend part of the component on installation ? Tried to put it in the administrator part but the scripts can't be ...
Toma Tomov's user avatar
1 vote
1 answer
87 views

Problem accessing database from front end of a component

I am currently working on a component which will display "events", stored in a database, on a map (filterable by location, category, date etc...). My first step is to display a simple report of the ...
d.Lewin's user avatar
  • 13
0 votes
1 answer
188 views

Optional fields in renderFieldset

I'm updating a component of mine to use the renderFieldset method and remove some unnecessary code in the form template files. However, some of my fields show / hide based on other preferences in the ...
user101289's user avatar
  • 1,119
0 votes
0 answers
272 views

Load namespaced library from component in J!4

I'm using the latest build of J!4. I have a component that has library files under joomla_root\libraries\mycomponent but the namespaced files in this directory aren't loaded by Joomla! 4 autoloader. ...
user3533235's user avatar
2 votes
1 answer
1k views

Joomla 4 namespacing and autoloading

I've added the namespace line to my manifest xml: <namespace>Mycompany\Component\Mycomponent</namespace> When I install the component, I'm not seeing any alias added to the libraries/...
user101289's user avatar
  • 1,119
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:...
Mike's user avatar
  • 341
0 votes
0 answers
24 views

Generated URL with token - The security token did not match [duplicate]

I'm trying to make a link that acts as the "save 2 copy" button on the edit page. On the main page for the item, I am creating the link according to this documentation: https://docs.joomla.org/...
Jonas Borneland's user avatar
1 vote
2 answers
268 views

use router.php in simple component

I am having a simple component, basically a list view and a single view. I want to nice URLs so I copy pasted and modified the router.php from com_content like this: class BookstoreRouter extends ...
Tom's user avatar
  • 43
1 vote
1 answer
149 views

Is there a way to remove component media files on update?

In my Joomla component I have a bunch of Javascript files in media that change on update ( basically a compiled Angular app ) and because of the way the system is structured, I need to only have the ...
glenatron's user avatar
  • 239
0 votes
1 answer
108 views

Send email upon publish/unpublish of an item in custom component

I have created a hello world component based upon this documentation https://docs.joomla.org/Special:MyLanguage/J3.2:Developing_an_MVC_Component/ I want to send a notification to users if an item's ...
Zack's user avatar
  • 101
2 votes
1 answer
449 views

What is the reason pagination of records its not working?

Following the Developing an MVC Component / Basic backend guide, I can't make the pagination to work, following the instructions this is the code I have, the records are listed properly and the ...
user615274's user avatar
3 votes
1 answer
257 views

How to send data with save2copy button?

I'm developing a component. I want to have the save as copy button appear next to each element on my front end list view. I have copied the save as copy buttons html from the edit view of a single ...
Jonas Borneland's user avatar
1 vote
1 answer
62 views

How to maintain a configuration change after Joomla update?

My component hooks into some core Joomla behaviour, adding an extra path that it needs other related components to be able to use. I do this simply by adding it to the global path include ( defines....
glenatron's user avatar
  • 239
0 votes
1 answer
1k views

Getting user id of logged in user in component

I'm making my first component and am trying to get the id of the logged-in user and request some data from the model based on that user id. If I search around this would return the current user: use ...
Merijn dk's user avatar
  • 103
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": $...
jost21's user avatar
  • 239
3 votes
1 answer
114 views

Content plugin doesn't add text to articles

I have the following plugin written: defined( '_JEXEC' ) or die( 'Restricted access' ); jimport( 'joomla.plugin.plugin' ); class plgContentModifyArticle extends JPlugin { function ...
Cowboy_Patrick's user avatar
1 vote
2 answers
37 views

Add Options to {loadedmoduleid ID}

I want to create a module that implements animated icons into my articles. For this I want to use the following icon-pack: https://github.com/icons8/titanic Then I want to somehow write in my ...
Cowboy_Patrick's user avatar
0 votes
1 answer
28 views

How can I create a custom joomla backend clone that works with the same sessions

I am trying to create a custom backend page in the same layout as Joomla. So none of the buttons have to work since I am going to be writing my own code, the only exception to that is the logout ...
twan's user avatar
  • 129
2 votes
1 answer
78 views

SEF URL Broken Image Links When Fetching API Results

Using Joomla 3.9.8 I'm using the fetch() api in order to retrieve some data from a remote API. When I have the api results I'm displaying them in html elements. The API returns various values, one ...
jonboy's user avatar
  • 3,593
4 votes
3 answers
565 views

How can I have multiple layouts for a View that are available as a menu option such as &layout=xxx?

I need to be able to specify different layouts of the same View by way of the Menu item, resulting in a url having &layout=blahblah appended. - NOT using a template override. i.e.: index.php?...
GDP's user avatar
  • 7,715
1 vote
1 answer
52 views

How do I unit test component methods that use the logger?

I have unit tests running for my component (using a bootstrap file to get the usual requirements) but as soon as I add any logging, I get: Class '\Joomla\CMS\Log\Log' not found` I have tried ...
glenatron's user avatar
  • 239
4 votes
1 answer
595 views

Joomla and Eventbrite Integration

I am looking for a way to integrate Eventbrite with Joomla. I want to show a list of upcoming events that I have created. There are a number of default widgets available with Eventbrite (copy / paste ...
jonboy's user avatar
  • 3,593
1 vote
1 answer
17 views

What is the best approach to implementing a component that responds to events?

I am working on a Component that will add a set of administrative functionality, which I am fairly confident in, but part of its behaviour will rely on code being triggered by events, which seems to ...
glenatron's user avatar
  • 239
2 votes
0 answers
28 views

Selecting the correct menu entry in a self written component

I have the following problem/setup: I develop a custom component in Joomla that has multiple views. The views should have links to each other. If I enable SEF in the global configuration, the links in ...
Christian Wolf's user avatar
1 vote
0 answers
113 views

Changing default editor in component to tinyMCE

I'm trying to integrate tinyMCE with my component but I'm getting issues with embedding tinyMCE JS and switching it from default. I've tried removing WYSIWYG.attach and replacing ...
ABC Group's user avatar
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 ...
Viktoriia Shestak's user avatar
3 votes
1 answer
2k views

How to use HTMLHelper to add to the document head

In this post: How to add CSS/JS/an Image to a module backend @lodder shows me how to use HTMLHelper to add CSS and JavaScript. Previously I had followed the Joomla! documentation https://docs.joomla....
Eoin's user avatar
  • 1,889
2 votes
1 answer
127 views

Adding redirect to redirect component from custom component

Is it possible to add a redirect to the redirect manager from my custom components controller or model? I want my custom component to add a redirect to the redirect manager on deletion of an item. I ...
TLWebdesignNL's user avatar
0 votes
1 answer
100 views

Accessing path to tmp directory in my component

How can I access in a custom component the full path to tmp directory configured in the Joomla configuration? I have changed the tmp directory to be outside of the Joomla! installation.
Maverik Minett's user avatar
1 vote
1 answer
72 views

How to integrate my custom Administrator component with core Joomla database tables during install?

Background: I am starting to package up three associated custom Joomla extensions that I've developed. (This is directly associated with my previous JSE question, if you want more context.) The ...
mickmackusa's user avatar
  • 4,781
0 votes
1 answer
171 views

Joomla 4 beta - Internal Service Error but no logged error

I've installed Joomla 4 beta 7 for development upgrading a Joomla 3 component. I have my logs (apparently) working correctly and I have test error log messages printing to the PHP error log as ...
user101289's user avatar
  • 1,119
1 vote
2 answers
102 views

Add the values of two fields together and on save put them in another field

I have made a custom component using https://www.component-creator.com (which made the process really easy). I have two fields that are only there to serve as sums of the other fields. At the moment ...
Eoin's user avatar
  • 1,889
2 votes
1 answer
189 views

Adding Additional Fields to Admin Component

I'm using Joomla 3.9.1 and SP Simple Portfolio v1.6 I would like to add some additional fields to the SP Simple Portfolio component. Image of current fields (taken from Google); How can I add ...
jonboy's user avatar
  • 3,593
4 votes
2 answers
508 views

Joomla 3.9.1 publish/unpublish no longer working (custom components)

I've recently upgraded my joomla site to 3.9.1, and now my custom components publish/unpublish buttons aren't working and I can't figure out why. The database column is called "state" and this is the ...
Leanne Seawright's user avatar
2 votes
1 answer
54 views

Add Database result As a Select Option

I'm creating a Joomla 3x SP Pagebuilder3 addon, but I'm having a bit of challenge getting a database results as an option in a select type. This is what I've done so far. class MyCustomTypes { ...
David Addoteye's user avatar
1 vote
2 answers
420 views

How to hide grey 'button bar' in administrator component view

Is it possible to hide the grey bar where buttons would normally go in an administrator view of a custom component? The grey bar shown below: I have no buttons to show, so don't want it to take up ...
codinghands's user avatar
  • 2,295
0 votes
1 answer
33 views

How to create 2 menus inside one component view

I've create a component called testComponent with a specific view called collection which needs to have 2 layouts the default.php and the list.php. I need to make both default and list as menu items ...
no0ob's user avatar
  • 111
1 vote
1 answer
285 views

SQL Error when updating custom component in Joomla 3.9

I have a custom component and I want to add language filter to my extension. So in my sql update file I added the following two lines to Alter my tables. ALTER TABLE `#__contract_contracts` ADD `...
mixahlos's user avatar
  • 418
1 vote
1 answer
102 views

Adding multiple Models into a component.

in my component Centros I have the view and model for Hospitals, working fine. I want to call a general model. general.php located in the models folder. class CentrosModelGeneral extends JModelItem ...
ValRob's user avatar
  • 123
1 vote
1 answer
521 views

Custom header content depend on article

I am wondering is it possible to have different headers depending on the different articles? e.g article ID 1 shows header A and article ID 2 shows header B. Currently I have modified the template ...
Z Pat's user avatar
  • 13
0 votes
1 answer
2k views

How does JFactory::getApplication->input get the input id

I am trying to get the current itemid of an especific menu which calls a custom component. I had a custom component called on the menu with the url /something. Inside of the site model of my ...
ValRob's user avatar
  • 123
2 votes
1 answer
2k views

Manually render filter form fields in layout

I am using the searchtools filters in the front end of a custom component. So I am displaying the fields in my template : <?php echo JLayoutHelper::render('joomla.searchtools.default', array('...
mixahlos's user avatar
  • 418
1 vote
1 answer
503 views

Save failed with the following error: Unknown column 'created' in 'field list'

As I develop the back end manage record functionality of a component, I am getting "Save failed with the following error: Unknown column 'created' in 'field list'" I built the helloworld component ...
IberoMedia's user avatar
4 votes
1 answer
1k views

with insert on duplicate key update - updating multiple rows at once

With latest joomla version I try to achieve one query to the database and updating multiple rows at once. I want to make a query like this: INSERT INTO `tablename` (`id`,`date`) VALUES ('79','2018-...
user348246's user avatar
1 vote
1 answer
133 views

How to debug an empty Bootstrap error generated by non-empty Tags field in a custom component?

Flowing on from my previous question about writing my first component (now called com_picture) which is nearly an exact clone of the com_contact directory, I have hit a snag with trying to save a new "...
mickmackusa's user avatar
  • 4,781
5 votes
1 answer
493 views

How to generate a dynamic note field for a custom component?

I am attempting to develop my first custom component called com_image. Because of the structure and function of my project requirements, it made best sense to clone the com_contact folder and ...
mickmackusa's user avatar
  • 4,781
1 vote
0 answers
56 views

Joomla auto update

Joomla documentation says Joomla has an additional parameter called extra_query in the #__update_sites table. This parameter will be added to the declared download URL However when I add ids = ...
user1616338's user avatar
1 vote
1 answer
235 views

Multiple templates for the same view of a custom component

In my custom component, I would like to have multiple slightly different templates for the same view. Something like com_things/ ... - views/ - thing/ ... - things/ - tmpl/ ...
dolma33's user avatar
  • 167
0 votes
1 answer
32 views

Field of type contact

In a form of a custom component, how can I add field of type contact instead of type user?
dolma33's user avatar
  • 167
1 vote
0 answers
166 views

Can't run task when there is constructor

I am building a component which will act as a API for a front end and was curious about something. For example if I call the url http://example.com/index.php?option=com_helloworld&task=shout it ...
Alex Mehan's user avatar