php plugin doesn't work in module

tanya2015

Member
Hello, I use php list plugin
$app = JFactory::getApplication();
$ids = $app->input->get('ids', array(), 'array');
$id = array_shift($ids);
$app->redirect('index.php/eks/importirovat-uchastnikov-gruppy?fzayavky___ex_date_raw='.$id);

It works very good in list links from menu, but if I use it from module with the same list I got
Invalid controller: name = 'list', format = 'html'
C:\OSPanel\domains\1.local\libraries\src\MVC\Controller\BaseController.php:291
in module i use prefilter, and setting from pic.

If I use Ajaxify it wheel only hangs....
thank you for any help.
 

Attachments

  • 123.png
    123.png
    20.6 KB · Views: 52
Last edited:
Set ajaxfy=yes in the list module.
If the loader is sticky there should be an error message in your browser console and/or in the browser network response.
 
there is 303 near post. But it's only in module. I use the same redirect plugin from list in menu and everything works perfect. the problem is that i need it from module too.
 

Attachments

  • 127.png
    127.png
    775.2 KB · Views: 50
Last edited:
I start to use js redirect and it works in module without problems. Yes it works good both in list from menu and from module.
 
Last edited:
Hello, Hugh, I'll try...
First description of my small task.
I have list let's say tourist groups (date-time, and some other info about group), I need to export info about group participants (name surname, phone, email) from word or excel files. In a list I create a button which runs some JavaScript code on the select records (I try only on select record not group; I don't need group) to redirect to import form (I have to make my own, standart import from csv not fit for me). As I need some parameters in import form about group (like date-time) I need to pass them via url.
code I use
Code:
var selected_row_id;
jQuery.each(rows, function(rowid, row) {
selected_row_id = rowid;
})
document.location.href = '../index.php/eks/import?yourtable___your_element_raw='+selected_row_id;/*here is your link of course */

to get parameters in the field in import form I use :

Eval default - Yes
in Default field of element I use code
Code:
$dateid = $_GET["yourtable___your_element_raw"];
return $dateid; /*id for my default databasejoin element */

As I have selected_row_id I easily get from database default values for all other fields in the form I need.
 
We are in need of some funding.
More details.

Thank you.

Members online

Back
Top