Integrator: Update doesn't insert new entries to database

  • jenni
  • Topic Author
  • Offline
  • Fresh Boarder
  • Fresh Boarder
  • Posts: 4
  • Thank you received: 0

jenni created the topic: Integrator: Update doesn't insert new entries to database

Hi,
I just encountered this problem today, and this never used to happen in the past with my existing code/forms.
When using the update type RULE in the integrator the form would update the database if the conditions are met OR add a new entry to the database when the conditions are not met. Now the update function stopped doing this correctly and does NOT insert a new entry if the conditions are not met and only updates the database if the conditions are met. Which means I have to create another integrator rule to do the insert if the update conditions are not met.

I don't understand why this changed because I liked the way it worked before. Is there a reason this change was made? Is it happening to others?
#240862
  • Posts: 8370
  • Karma: 164
  • Thank you received: 666

TheMuffinMan replied the topic: Integrator: Update doesn't insert new entries to database

Hi,

sudden changes are often a signs of changes (updates) of underlying dependencies. I could imagine that for example there has been a database upgrade and the SQL being used is not working any longer. But this is only one example.

So my first question would be if you are using actual custom queries in your integration? If yes, could you please post them here?

Regards,
Markus

===========================
If you are happy, please leave us a small review here to keep us motivated:
(Please turn off your VPN and local Apache prior reviewing as your review might get blocked)

⭐⭐⭐⭐⭐ BreezingForms: extensions.joomla.org/extension/contacts...orms/breezing-forms/
⭐⭐⭐⭐⭐ ContentBuilder: extensions.joomla.org/extension/authorin...tion/contentbuilder/

===========================
Satisfied?
Get a membership!
===========================
#240905
  • jenni
  • Topic Author
  • Offline
  • Fresh Boarder
  • Fresh Boarder
  • Posts: 4
  • Thank you received: 0

jenni replied the topic: Integrator: Update doesn't insert new entries to database

Hi Markus,
I have many, many rules in the site for different forms and there are Rules with codes to separate arrays. ie:

if(is_array($value)) $value = implode(",",$value);

But there are simple forms with only textboxes and these are not inserting into the database when there is only an 'UPDATE' rule.

Database Type mysql
Database Version 5.7.30-log
Database Collation utf8_general_ci
Database Connection Collation utf8mb4_general_ci
PHP Version 7.2.30

I'm using Joomla and forms that use the joomla insertion/update codes in their submit pieces ARE working, while forms with ONLY the integrator used to enter database values are NOT working. So it's specifically the integrator that is having issues.

To be clear, the update rule on integrator IS updating the existing entries, they just aren't creating the new entries when usually they do if the update conditions are not met.
#240919
  • Posts: 8370
  • Karma: 164
  • Thank you received: 666

TheMuffinMan replied the topic: Integrator: Update doesn't insert new entries to database

hm, ok. are you using sort of custom piece? maybe one of them has issues and interrupts the script from moving forward (the rules are triggered in the very end of the submission process).

I know, usually the update rules should create an entry if there none existing yet, but the above could still cause issues in that regard.

===========================
If you are happy, please leave us a small review here to keep us motivated:
(Please turn off your VPN and local Apache prior reviewing as your review might get blocked)

⭐⭐⭐⭐⭐ BreezingForms: extensions.joomla.org/extension/contacts...orms/breezing-forms/
⭐⭐⭐⭐⭐ ContentBuilder: extensions.joomla.org/extension/authorin...tion/contentbuilder/

===========================
Satisfied?
Get a membership!
===========================
#240959
  • jenni
  • Topic Author
  • Offline
  • Fresh Boarder
  • Fresh Boarder
  • Posts: 4
  • Thank you received: 0

jenni replied the topic: Integrator: Update doesn't insert new entries to database

Hi,

I have versions of this same site that still work correctly (not yet updated). I have found that the problem started with the most recent update to the latest version of Joomla ‎3.9.18.

Under Version: Joomla! 3.9.15 Stable the integrator is working correctly.

These forms are all old forms and not new forms. There are submit pieces but they've never had an issue before. Also like I said the ''update" is working but the insert is not.

I also updated BreezingForms to 1.9.0 Stable (934) from 1.9.0 Stable (926) but I assumed that was not the issue.

A version of the site with BreezingForms 1.9.0 Stable (926) and Joomla! 3.9.15 Stable are still working correctly for me.

In order to test your theory above I created a new form:
Only has 2 elements. One is a textfield element (used for table id) and one with text area (used for inserting the text to table).

I am using the update type integrator rule to insert the contents of this testing form into the table. IF the id element matches the table column id then UPDATE and if not then the integrator should INSERT.

The result of submitting the form:
ID : 9999
Text : TEST

On the mysql table there is a new data entry:
ID : 867 (this is the AUTO_INCREMENT value of the table)
Text: (empty there is no information)
All other columns inserted in the table are empty or default values.

This is with NO scripts and NO form or submit pieces on this form. So the insert is working but not working correctly.

Now I do this process again:

The result of submitting the form:
ID : 867
Text : TEST

On the mysql table there is no new data entry, the existing entry for 867 changed:
ID : 867
Text: TEST

So the update is working but when I try to create a new entry it does not.
#240999
  • Posts: 8370
  • Karma: 164
  • Thank you received: 666

TheMuffinMan replied the topic: Integrator: Update doesn't insert new entries to database

Yes, the problem appears to have happened upon the last build process: the integrator part of the J4 development branch made it into the build.

Please download, unzip and copy the file attached into

\administrator\components\com_breezingforms\libraries\crosstec\classes

It should solve the problem.

If you can confirm it, I will release an update.

File Attachment:

File Name: BFIntegrate.zip
File Size:2 KB


Thank you for reporting it!

Regards,
Markus

===========================
If you are happy, please leave us a small review here to keep us motivated:
(Please turn off your VPN and local Apache prior reviewing as your review might get blocked)

⭐⭐⭐⭐⭐ BreezingForms: extensions.joomla.org/extension/contacts...orms/breezing-forms/
⭐⭐⭐⭐⭐ ContentBuilder: extensions.joomla.org/extension/authorin...tion/contentbuilder/

===========================
Satisfied?
Get a membership!
===========================
#241039
Attachments:
Moderators: ForumSupport
Time to create page: 0.053 seconds

We Are Doing Our Part

Massive discounts on all of our extension subscription plans to help you and your business in these times.

Get Your Subscription Here

New Icon Packs Category!

Crosstec is now offering icon packs.

If you are a paying subscriber, icon packs are automatically added to your account.

Check out our icon packs page!

News and Updates

Get informed about new downloads, updates and more in our News and Updates newsletter.

All Extensions Subscription

We are doing our part and support your business with extremely low prices -- For example 6-Months-Subscription for only $9 USD. For as long as necessary.

No support per domain or website installation limits! Includes all of our current and future Joomla!® extensions, Joomla!® templates for the duration of your membership. This means, by purchasing an All Extensions Subscription you'll have it all covered!

Get it from here

3rd Party Discount - 25% Off

We help you to keep your costs under control. If you are a new member and purchased a form building tool from a different form vendor, then you'll get a 25% discount on our subscription plans.

How to receive the discount:

Send us a quick email to sales@crosstec.org with a proof of purchase (for example a paypal receipt), await payment instructions and enjoy your membership!