Skip to main content
2 votes
Accepted

How to use Joomla.listItemTask in Custom Component

Controller task methods in Joomla do not accept any arguments. They should read data from Joomla\Input\Input object. The key to read depends on your HTML markup. It is the name of the element with ID ...
Sharky's user avatar
  • 11.5k
2 votes
Accepted

DB Query with JOIN in Task Plugin

You are casting the column name to integer in PHP, which always results in 0: (int) $db->quoteName('a.type_id') This results in query like this: LEFT JOIN `uj2k9_mycomponent_rectypes` b ON b.id = ...
Sharky's user avatar
  • 11.5k
1 vote

DB Query with JOIN in Task Plugin

Your script is doing several things that it doesn't need to and a few things that are actively harmful to your process. Casting a column name to an integer doesn't make any sense, but I suspect you ...
mickmackusa's user avatar
  • 4,826
1 vote
Accepted

Scheduled Task - Plugin to use Rules

Apparently, the entire task object is passed to the event but there is no proper method for retrieving it. So you have to resort to using getArgument(): $rules = $event->getArgument('subject')->...
Sharky's user avatar
  • 11.5k
1 vote

Scheduled Task - Plugin to use Rules

Looking at the code in /administrator/components/com_scheduler/src/Task/Task.php the execution_rules aren't included in the event. So going from the code there: $event = AbstractEvent::create( '...
Robbie Jackson's user avatar
1 vote
Accepted

How do Joomla CLI/Console jobs and Task Scheduler jobs fit together?

Not all Cli based applications are required to be run on a schedule therefore not all Cli instances are suited to be created or converted to the Task Scheduler approach thus there is no choice for ...
Irata's user avatar
  • 4,001
1 vote

Scheduled task only running when logged in0

Like Irata suggested, you are probably using Joomla's lazy scheduler to trigger the tasks. Lazy means that it only works when your website is visited. You could create one cron job on your server that ...
pe7er's user avatar
  • 2,068
1 vote

Deleting rows in two different tables

You can definitely delete rows from multiple tables in a single query, but Joomla doesn't offer a query-building technique to accommodate this. If you absolutely demand that query builder methods must ...
mickmackusa's user avatar
  • 4,826
1 vote
Accepted

Deleting rows in two different tables

Why don't you do it in 2 steps? I would do something like the following code. As you can see I use name spacing (since Joomla 3.8), used quoteName the table + field names and added a try/catch block. ...
pe7er's user avatar
  • 2,068
1 vote
Accepted

Error "Uncaught TypeError: Cannot set property 'value' of undefined" on submit form

Add task field to the form's HTML. <input name="task" type="hidden">
Sharky's user avatar
  • 11.5k

Only top scored, non community-wiki answers of a minimum length are eligible