Upsert plugin does't work with not J! database

calmdevil

Member
Hello,
I have database on the same server as J! and Fabrik is connected with it (simple forms and tables from it work normal) but when I need to update other table via form upsert plugin (I check connection with not J! database) I get this:
"Error. Table 'J!database.table' doesn't exist SQL=INSERT INTO table SET `userid` = 'user_email'"
Fabrik tries to insert a record into J! database but checked other and J! has not same table.

I think, a same problem when I use databasejoing element I must to manually create fabrikar join table in unrelated database, otherwise Fabrik cant to get data. Fine, but this table Fabrik doesn't uses - it needs only to this table exists.
 
I can confirm the issue (upsert.php is doing if (!isset($this->db) in line 90, but it IS set to connection1)
Is your form with the upsert plugin in the J!database?

I don't know if this is a bug or just the Fabrik restriction that you can't do things across DBs
(so no dbjoin pointing to an other DB, no user element in lists using non-J!-DB, no upsert from a J!DB table to external table...)
 
No, form is not in J! database, as other elemetns: I use dbjoing, cascadingdropdown, user, calc and field elements in form.
 
Ok, may be, if I show real situation it will be more clear:
I have db 'userbase', and J! is installed into db 'zoo'.
I have created two lists in 'userbase': kits and basket. When user adds new kit request via form 'kits' it should to add new record not only in 'kits' table but in 'basket' table through 'kits' form upsert plugin (Connection: userbase, List: basket, primary key: id, row value: empty). In Values I checked 'Userid' (of basket) as Key and Value '{kits___userid}' placeholder. And get this:
"Table 'zoo.basket' doesn't exist SQL=INSERT INTO basket SET `userid` = 'user@email'"
Fine, but when I delete all from Values in upsert plugin and leave it empty I get:
"You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '' at line 2 SQL=INSERT INTO basket SET"
 
We are in need of some funding.
More details.

Thank you.

Members online

Back
Top