Forums

Datasets not working anymore after updates

typomaniac 07 Mar, 2019
Hi Chronoengineers,
before I go into technical details which I probably not even might reproduce here, because this project cost me weeks - without being a programmer, but just a dumb web designer, let me explain the issue:
For an education institute I created a way for the teachers so simply fill in forms with day-by-day homework texts. Because the customer wanted to publish always the current as well as the following week, I gave the forms the option to be defined as "current week" and "following week" to rearrange them. This looks pretty good:
http://eduparc.ch/index.php/de/schulalltag/stundenplan-10-klasse/hausaufgaben-7-klasse

The interface was too perfect ;-) I called the two forms (which write into the same DB table, but into different aid's and added a preview, so the teachers could check if they didn't make too many mistakes:


So far, so well. This all worked perfectly - until two weeks ago. Since, It's not possible anymore to save both forms. If we save the upper form and define it as "current week", that's ok. But as soon as we define it as "following week", it's empty. And: the lower form is not sent at all. We cannot make any changes in the fields. Its a complete mess. I cannot tell if it's because a J3.x update, a Chronoforms6 update or whatever.
The forms look somewhat like this:


Is this a known issue, is there a workaround or does anybody need more info to help me bringing this to working again?

Thanks so much,
Martin
healyhatman 07 Mar, 2019
I would (personally) turn off Auto Manage, clear the Data provider field, and put all the fields you're updating in manually. Also your data save action there is a bit weird.... You're updating all entries with AID 2 to havef..... aid 2?
typomaniac 08 Mar, 2019
Hi healyhatman,
thanks so far for your inputs. I did as you proposed, but this changed nothing: Saving the second form leads to no action at all. As mentioned in my initial post, everything worked like a charm until I updated J as well as CF6...
Martin
healyhatman 08 Mar, 2019
Screenshot your new save data action.
typomaniac 08 Mar, 2019
...although this screenshot is the other form with aid1; but they're all the same.
healyhatman 08 Mar, 2019
of the three things i said to do, you've done one.
typomaniac 08 Mar, 2019
...two ;-) sorry: indeed I forgot this one: "clear the Data provider field, and put all the fields you're updating in manually". I'll try that - sorry!
typomaniac 08 Mar, 2019
Please bear with me... but this leads to a server error. Probably "field:blahblah" is wrong. But ... what would be right? How do I get the demanded values for the fields? I don't even remember, how I got those in the "Data override on Insert" field...


healyhatman 08 Mar, 2019
databasefieldname:{data:formfieldname}
Max_admin 08 Mar, 2019
The correct way to test this is to add a "Debugger" action to the end of the submit event and check what happens when the form does not save or is empty.

Best regards
Max, ChronoForms developer
ChronoMyAdmin: Database administration within Joomla, no phpMyAdmin needed.
ChronoMails simplifies Joomla email: newsletters, logging, and custom templates.
healyhatman 08 Mar, 2019
that wouldve been the next step but yes do that
typomaniac 08 Mar, 2019
OK, done this now, but still I get "internal server error". The debugger doesn't show anything
healyhatman 08 Mar, 2019
okay so not literally "databasefieldname" mate, you actually put the name of the field in your database.
typomaniac 08 Mar, 2019
...you see, I'm kinda stupid ;-) Thanks for your patience...
Tried that, and: we have the same behaviour like before when I just had {data:} in the data provider. The first form is being saved to the DB, but the second doesn't show any reaction. No entries, nothing...
But at least, I now got the debugging info.

So the second form is not sent at all (indepently which of both forms. The second shown is always the one that has the following week's data). Therefore, the second form doesn't show any debugging info.

Array
(
[chronoform] => klasse-7-2
[event] => submit
[tvout] => view
[display-section1] => Array
(
[counter] => 0
)

[_counter] => 0
[woche_vom_1] => 18.–22.03.2019
[aktuelle_woche] => 1
[montag] =>
[dienstag] =>
[mittwoch] =>
[donnerstag] =>
[freitag] =>
[cookie_consent_status] => true
[__utma] => 111872281.971220766.1552026977.1552030100.1552032855.3
[__utmc] => 111872281
[__utmz] => 111872281.1552026977.1.1.utmcsr=(direct)|utmccn=(direct)|utmcmd=(none)
[reDimCookieHint] => 1
[joomla_user_state] => logged_in
[be589b2ea96251192eb31da59e69dea7] => 65e092c0c81cb492c62e3dcb8e2c8fb4
[be77137f98100d350ea9a74166554a34] => ed08ae9bdabc86d9cfa2bbad083dbace
[__utmb] => 111872281.48.10.1552032855
[__utmt] => 1
[language] => de-DE
[Itemid] => 271
[option] => com_content
[lang] => de-DE
[view] => article
[id] => 45
[klasse-7-2] =>
)
Array
(
[save_data4] => Array
(
[data] => Array
(
[woche_vom_1] => 18.–22.03.2019
[aktuelle_woche] => 1
[montag] =>
[dienstag] =>
[mittwoch] =>
[donnerstag] =>
[freitag] =>
)

[_success] => Data saved successfully
[log] => Array
(
[0] => UPDATE `v6hns_chronoforms_data_klasse-7` AS `Data4` SET `woche_vom_1` = '18.–22.03.2019', `aktuelle_woche` = '1', `montag` = '', `dienstag` = '', `mittwoch` = '', `donnerstag` = '', `freitag` = '' WHERE `aid` = '2';
)

[var] => Array
(
[woche_vom_1] => 18.–22.03.2019
[aktuelle_woche] => 1
[montag] =>
[dienstag] =>
[mittwoch] =>
[donnerstag] =>
[freitag] =>
)

)

)
typomaniac 08 Mar, 2019
BTW: The implementation of the forms in the content pages looks like this:
<?php $db = JFactory::getDbo();
$query = $db->getQuery(true);
$query->select('aktuelle_woche', 'aid == 1');
$query->from($db->quoteName('v6hns_chronoforms_data_klasse-7'));
$db->setQuery($query);
$result = $db->loadResult();
if ($result == '1') {echo '{chronoforms6}klasse-7-2{/chronoforms6}<p>&nbsp;</p>';
}elseif ($result == '2') {echo '{chronoforms6}klasse-7-1{/chronoforms6}<p>&nbsp;
</p>';}?><?php $db = JFactory::getDbo();
$query = $db->getQuery(true);
$query->select('aktuelle_woche', 'aid == 2');
$query->from($db->quoteName('v6hns_chronoforms_data_klasse-7'));
$db->setQuery($query);
$result = $db->loadResult();
if ($result == '2') {echo '{chronoforms6}klasse-7-2{/chronoforms6}<p>&nbsp;</p>';
}elseif ($result == '1') {echo '{chronoforms6}klasse-7-1{/chronoforms6}';}?>
Max_admin 08 Mar, 2019
How does the app works ? the 2 forms are shown on the same page ? or the 2nd is shown after the submit of the first ?

Best regards
Max, ChronoForms developer
ChronoMyAdmin: Database administration within Joomla, no phpMyAdmin needed.
ChronoMails simplifies Joomla email: newsletters, logging, and custom templates.
typomaniac 08 Mar, 2019
Hi Max,
per class, there are two forms: one for the current week, one for the following week. Their status can be changed with a radio button. Both forms are called with php into a content page. There I can change the input fields and define which week which form stands for. I could not make one form with two containers in it, as the ordering of the output (two tables) has to be in the defined order. The current week always has to be the first table, the following week the lower table.
The idea behind was, that the teachers don't have to copy/paste the input field texts, but just change the obsolete week and define it as the new following one.
As mentioned above, this worked like a charm since last july. All were happy: the teachers, the kids - and I. But since some update one or two weeks ago, this won't work anymore.
As a workaround, I had to separate the tables and make them accessible through separate menu entries. When filled and sent separately, it's no problem at all...
healyhatman 08 Mar, 2019
you can't send two forms at once it doesn't work that way.
typomaniac 09 Mar, 2019
Well, as I said: it worked like a charm for months and months ...
healyhatman 09 Mar, 2019
Right well I probably just didn't understand , my bad.

No other changes you've made at all? It's just the CF update? Have you tried installing an earlier version?
Max_admin 10 Mar, 2019
Hi,

So the radio button "Aktuelle woche" decides which form is going to be saved ?

If yes then what about the fields names in both forms ? are they different ? because if you have fields with the same names then the later will overwrite the former.

If you write click the page with the forms and choose "view source", there are 2 different form "tags" with 2 different "action" urls ? or how do you handle the forms data ?

Best regards
Max, ChronoForms developer
ChronoMyAdmin: Database administration within Joomla, no phpMyAdmin needed.
ChronoMails simplifies Joomla email: newsletters, logging, and custom templates.
typomaniac 11 Mar, 2019
I'll try to install an older version. But: where can I get that? Seems like I can just download the last version?
Max_admin 11 Mar, 2019
You do not need to install an older version, updates are usually important and may contain security updates, please provide more info so we can find the source of the issue!

Best regards
Max, ChronoForms developer
ChronoMyAdmin: Database administration within Joomla, no phpMyAdmin needed.
ChronoMails simplifies Joomla email: newsletters, logging, and custom templates.
typomaniac 11 Mar, 2019
Thanks, Max.
Then what I'll do is installing the site in a sandbox environment. Meanwhile, I've created a somewhat quirky workaround on the live site and try to figure out the issue on my localhost. I'll get back to you as soon as I'm ready.
typomaniac 11 Mar, 2019
Max,
the sandbox version is now up and running. Could you please let me know how to send you the login data via PM?
healyhatman 11 Mar, 2019
Click his name, then the envelope icon bottom left of the popup window.
This topic is locked and no more replies can be posted.

VPS & Email Hosting 20% discount

{item:title} {images:#}