Questions tagged [development]
This tag is for question about the development of features or extensions in Joomla.
384
questions
0
votes
0
answers
21
views
Route not working properly on J4?
I have a menu entry like so:
ID: 524
Type: Articles->Create Article
Link: index.php?option=com_content&view=form&layout=edit
In the "old days" I'do Route::_('index.php?option=...
1
vote
1
answer
40
views
Joomla 4: no need for Route::_($url)?
I am using this on a custom component:
$url = index.php?option=com_content&view=article&catid=427&id=15106
Both
echo $url;
echo Route::_($url);
will output a friendly url.
I'm guessing ...
0
votes
1
answer
45
views
Disable custom field validation
I've created a new custom field type name "lazyload" on Joomla 4.
Basically it is a list field that places an empty (no options) HTML select tag and uses the select2 plugin to fetch the ...
1
vote
1
answer
43
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
0
answers
79
views
How do I upload a file with article custom fields?
I've created a custom field plugin type "file" and am using it as custom field on articles so users can upload a file (the "media" type file does not suit my needs).
It looks and ...
2
votes
1
answer
45
views
Adding Javascript to the Administrator Template
Is there a way to add Javascript to the Joomla Administrator template without creating a child template?
Something equivalent to /media/templates/administrator/atum/css/user.css for Javascript.
1
vote
0
answers
48
views
How can I override custom fields layout for the Administrator side?
I'm using Custom Fields in articles intensively.
I need to override the Custom Fields edit layout on the administrator side.
Editing the files created via Administrator Template Overrides do not work.
...
0
votes
2
answers
27
views
Why does template stuff still appear after uninstall [helixultimate]
I installed the site template Helixultimate. Some time later, I removed it by Manage Extension.
Then, I logged stuff inside of SiteMenu.php and found e.g. helixultimatemenulayout inside the params ...
2
votes
2
answers
90
views
Change title for Categories page on custom component
I'm writing a component that will rely on Joomla's Categories to manage its own categories.
Everything's working OK, I just cannot figure out how to change my component's Categories list title.
I'd ...
2
votes
1
answer
80
views
Content triggers on batch actions
I need to trigger code when an article is moved from one category to another.
onContentAfterSave works fine for a single article, but what if I move articles via Actions -> Batch? Is there a ...
2
votes
1
answer
40
views
How to 3rd party routing to my component?
I need to add EasySocial routing to my own component, so that JRoute([some EasySocial link]) outputs a proper EasySocial URL.
How can I do that? If I understand correctly, EasySocial routing is active ...
2
votes
1
answer
42
views
Extension update server - targetplatform to support 4.2 and later
I want my extension to support Joomla 4.2 and later, what should I write for the targetplatform in that case? Will 4.* do the trick?
Writing something like 4.[2|3] for the targetplatform is not a good ...
0
votes
1
answer
69
views
How to connect custom authentication plugin to openid so I can authenticate it through steam?
I need to create a "login using steam button" for a website using Joomla, from my research I can gather up that using OAuth no longer works for Steam, so I'll have to create a custom ...
0
votes
1
answer
39
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 ...
1
vote
1
answer
156
views
About Joomla 4 Lazy Loading feature
everyone.
I've read this: https://magazine.joomla.org/all-issues/january-2021/using-native-lazyloading-on-your-website, so it's clear to me that media images inserted in articles content will be lazy-...
0
votes
1
answer
18
views
Menuitem form field type: show only components
I am building an admin side form and placed a Menuitem form field, that is working just fine.
It is showing all the menu entries as expected, but I need it to list only the ones for "components&...
0
votes
1
answer
30
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('...
2
votes
0
answers
57
views
Very slow HTTP response times possibly due to SEF rules in htaccess
Im running Joomla 3.X and can't seem to pinpoint why I'm getting such high HTTP response times.
I think I narrowed it down to the SEF rules in my .htaccess
I ran some tests and thought to post my ...
1
vote
2
answers
112
views
Use different module settings/parameters on different posts in Joomla!
TLDR: Is there an easy way to include the same instance of a module in different posts with different settings in Joomla!?
What works: URL parameters. I can call the post with a URL to which I append ...
2
votes
2
answers
254
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 ...
1
vote
0
answers
24
views
How to set another price (EUR) after current product price in Virtuemart 3.8.8
In current VM shop we need to add EUR currency next to domestic price, calculated by specific conversion value.
I was hoping to do it with custom VM plugin, however I am having trouble finding ...
1
vote
1
answer
113
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
vote
1
answer
686
views
404 View not found [name, type, prefix]
I'm currently building a new Joomla! 4 component from scratch by following along a series of blog posts since I am new to Joomla! and its development.
I am using Joomla! 4.1.5
Unfortunately I am not ...
1
vote
1
answer
36
views
Library manifest delete folder
I use a library in my component with these folders:
/library/wbs/classes
/library/wbs/helpers
/library/wbs/js
/library/wbs/css
/library/wbs/libraries
And I want to use this manifest:
<?xml version=...
2
votes
1
answer
119
views
How to remove a file from a template using the installer?
I am developing a template for a small group of sites. In the old J3 days, I had to make an override for some core templates to fix some minor things. With the update to J4 this was no longer ...
1
vote
1
answer
2k
views
Trouble linking external css file with Dompdf library
I'm trying to create a Joomla system plugin enabling a user to generate a pdf based on a template. I'm using the Dompdf library. I managed to create a PDF, but linking to an external css file isn't ...
1
vote
0
answers
277
views
Joomla 3.9 CORS error
I'm trying to allow CORS on my website but I can't get it to work.
I've seen many posts about this, from updating .htacces, httpd.conf, meta tags, and php headers, but nothing worked. I always get a ...
4
votes
1
answer
236
views
Coding Standard Question - defined( or \defined(
A general Joomla! coding question... Checking _JEXEC is defined.
In administrator/components/.../src/everywhere it is
defined('_JEXEC') or die;
use function defined;
Whereas in components/.../src/...
1
vote
0
answers
219
views
How to programmatically change a page's meta tag?
I am making a very simple product page for my site. With very little component development experience, I decided to build this page with Javascript only. The URLs will be like https://mystie.com/...
1
vote
1
answer
28
views
Event for user creation in administration
Is there an event like onUserCreation() for the backend in J3? So if an administrator creates a new user, specified code (e. g. from plugin) is executed. In the API guides I didn't find any obviously ...
1
vote
0
answers
88
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
1
answer
46
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:
...
1
vote
2
answers
176
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 ...
2
votes
1
answer
429
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 ...
1
vote
1
answer
45
views
Restrict access to your paid extension
Our company is wanting to deploy a pro and free version of our extension onto JED. Is there any way that I can prevent people with the free version from hacking to get the pro version? I would like to ...
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
1
answer
174
views
How to use Openlayers transpiled Javascript code in my own extension (a "bundle")
I am developing a Joomla 3.x content plugin to display Openlayer maps in articles based on @Robbie Jacksons excellent tutorial at https://docs.joomla.org/J3.x:Developing_an_MVC_Component/Adding_a_Map ...
3
votes
3
answers
184
views
Multilingual site where several countries share the same language
I'm making a multilingual site where I'm using Spanish, English, German, and others.
I have already made several multi-language sites and I am familiar with the process but in this case, my client ...
2
votes
2
answers
107
views
Reroute all emails to developer / debug address
I am trying to intercept outgoing emails from joomla and reroute them to my email address for development and testing. Ideally I could set up a toggle under Global Configuration > Server > Email ...
0
votes
1
answer
61
views
How to write Joomla functionality that writes image data directly to the browser?
I am in the process of writing Joomla functionality that will produce JPEG-images on the fly using Imagick and GD. It is supposed to be used in Joomla articles like this:
<IMG src="/index.php?...
1
vote
1
answer
74
views
Reason for parameter for using custom fields in configuration
In the Joomla Core Extensions we have a parameter for selecting if custom fields are used in an extension or not. For example here: https://github.com/joomla/joomla-cms/blob/staging/administrator/...
3
votes
1
answer
144
views
How to replace deprecated Joomla classes with VS Code?
Is there a way to conveniently replace deprecated Joomla classes with VS Code. I do have the PHP CodeSniffer (with Joomla Coding standards) and Intelephense extensions, although I am not sure if ...
2
votes
2
answers
512
views
How can I generate a stubs file for Joomla?
I'd like to develop Joomla components with VS Code.
With PHP Intelephense enabled, all my file show errors because I use Joomla classes and functions. (And it would also be convenient to have auto ...
1
vote
1
answer
44
views
DPDocker and Joomla
I'm new to Docker. I tested https://github.com/Digital-Peak/DPDocker. I was able to implement things quickly with the component https://github.com/Digital-Peak/DPAttachments.
Now I'm in the process of ...
1
vote
2
answers
263
views
Use addScriptOptions for multiple modules on same page
I am passing some params to JS in my custom module using the addScriptOptions provided by Joomla:
$document->addScriptOptions("mod_mymodule", $params));
This works fine, as long as there ...
1
vote
1
answer
2k
views
Pass PHP variables to CSS?
I want to pass some variables to my css, without using inline styles. During some research I found different sources pointing to the same solution. For example here on the Joomla forum.
Basicly they ...
0
votes
1
answer
166
views
Joomla php function which prints the pagename
Is there a php function to insert in the template which prints the name of the menu item of the displayed page?
0
votes
1
answer
96
views
Creating a Library with multiple classes within a single file
I am trying to incorporate an external application as a library within Joomla which I have done before on a couple of occasions, however in this case there is a single .php file with about 20 classes ...
1
vote
1
answer
82
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 ...
2
votes
1
answer
492
views
In front end of component use the Admin controller and model to delete records
I would like some help in using the delete() methods of the AdminController and AdminModel when in a front end list view to avoid duplicating code unnecessarily.
I have a listing of records in a ...