Questions tagged [custom-component]
For questions related to custom component development
51
questions with no upvoted or accepted answers
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('...
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....
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($...
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 ...
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 ...
2
votes
0
answers
62
views
Clear component toolbar task
I've added a custom toolbar button to export the items from a custom component as a CSV.
The CSV is getting exported correctly but my custom task is then being triggered when navigating the ...
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.
...
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 ...
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 ...
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
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 ...
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 ...
1
vote
0
answers
47
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=&...
1
vote
0
answers
95
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 ...
1
vote
0
answers
28
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 ...
1
vote
0
answers
160
views
Embed custom JS app in Joomla MVC
A before warning: I'm new to both Joomla, PHP and JS. So this might be obvious, but I'm lost.
I'm looking to embed a program I made in react/node into Joomla.
The program uses JSX to create the HTML ...
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:...
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 ...
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 = ...
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 ...
1
vote
0
answers
163
views
"Joomla is not defined" error when logged in - Pagination
Hi we have 2 different custom componenets running on a website (they aren't loaded together, just have the same issue) and they have pagination.
We are finding that when clicking on the pagination an ...
1
vote
0
answers
578
views
JModelAdmin - save() method. What's the purpose of $table->newTags?
Can someone explain me why in the save method of the AdminModel class, there is the creation of a new $newTags property on the $table?
How this new property is used? How is it handled later on by the ...
1
vote
0
answers
24
views
JToolbarHelper contents disappearing when cache is enabled
I've setup my custom component using JToolbarHelper for navigation, following the standard set by base Joomla components.
Each view contains some variation of the following:
JToolbarHelper::title(...
1
vote
0
answers
28
views
When I install a custom component, language is installed but jomla not detect
That's the structure to a custom component.
The installation is OK, but Joomla don't detect the languages that I have to that component.
That is the structure to my xml file.
1
vote
0
answers
726
views
404 component not found backend
I developed a component extension, I Installed it on my Joomla in a regular server. I also received the success message after Installation.
It's table is added, all files under administrator and ...
1
vote
0
answers
571
views
Using CodeMirror editor in custom component
I am trying to use CodeMirror as the editor for a field inside a component I am developing. I have specified the editor as codemirror in the form.xml file but I get a javascript error on the page:
...
1
vote
0
answers
91
views
How to implement nested submenus in the administrative sidebar?
I'm using JHtmlSidebar::addEntry() to build a menu in the sidebar. However, I need a better way to organize the menu items in there. I don't see a way to easily create a nested menu structure. I'm ...
1
vote
0
answers
18
views
Need some suggestion regarding strategy of scraping article view times from another webpage to use in K2 item
I am building a video blog page using Joomla 3.0 + k2 hosted on my own Ubuntu 14.04 server, the videos will be uploaded to sites like youtube or vimeo too. I want to show the viewed times of the ...
1
vote
0
answers
46
views
$mymodel->publish($id, $state) returns "false" when calling it via CLI - on Web it returns true
I got a little problem: I would like to publish an item with some "different" states (1,0,2,-2,-1).
I'm doing this this way:
if(empty($this->getErrors()))
{
$tableitem->store();
$...
1
vote
0
answers
153
views
How to add more notes/text to the access.xml section of a joomla component?
I have very many actions in my sections of the access.xml file of my component. So that means a long list of permissions. I want to categorize them with some more surrounding text. Here is how it ...
1
vote
1
answer
425
views
Search in custom component
How can I improve the Search component in joomla 2.5 to set search by my custom component?
Can't find, where I can modify the search request to database.
UPDATE:
With help of Rene Korss I solve the ...
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
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
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
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 ...
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
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
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
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
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
0
answers
57
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 ...
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
0
answers
49
views
Possible to add template file to component on plugin installation?
I am making a plugin for a custom component. It's a basic editor extend plugin that allows users to select an item from custom component using a button in editor. It's simular to native editor extend ...
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,...
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
0
answers
46
views
JRoute not return specific menu item link
i have developing a custom component. i have a problem:
i am in a menu that show view 1. when i use JRoute function for link to view2 that have specific menu item, it return current url and add ?view=...
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.
...
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
0
answers
108
views
Create custom HTML page as administrator menu in Joomla 3.7
As we know Joomla 3.7 permits to create custom administrator menus, but is it somehow possibile to create "Custom HTML" administrator single item menu? Something like creating single article menu on ...