Buy Now
Sign in

Database viewing error in admin

marijkekovoks , November 14 2017
M
marijkekovoks
Hello there,

I updated chrono to 6.0.14 (joomla 3.8.2) and now when I try to view the database of a form in de admin I get this error: "0 Cannot use string offset as an array"

When I check the database in phpmyadmin I do see the new entries in the database after testing the form, so the data is stored, there is just this error.

Could you help out?

Kind regards,

Marijke
admin
Hi Marijke,

No problems here, please Go to the Joomla global config and set the Joomla error reporting to maximum and check if there is a more helpful message displayed ?

Best regards
Max
If your main question got answered then please mark the answer using the button!​
​Please let us know if you have any problems with the new forums text editor, we appreciate your feedback!
M
marijkekovoks
Hi Max,

I tried that, but unfortunately nothing usable is added to the error:



I could give you an admin account so you could take a look yourself?
The error occurs when I go to chronoforms, select the database of the form in the pulldown in the "database table" column...

Would it help if you take a look in the admin?

Kind regards and thanks for your help...
M
marijkekovoks
Hi Max,

I am back! I just installed chronoform 6.0.13 on a completely different site, then updated it, then created a form and as I proceeded to create a database table by checking the form and clicking on the purple "create table" button I got the same error as i had on the other site: "An error has occurred. 0 Cannot use string offset as an array " Again, no extra info came up by setting the error reporting to maximum in the config.
This is a relatively new site (couple of months) and it is up-to-date with core and extensions.

Again I could provide an account on either site or both to help you further...

I also involved our programmer here to see if he can find more info...

Thanks, regards, Marijke
M
marijkekovoks
Hi, me again.

Our developer had a look on the server and found something not correct in the code. He made a patch. Here is what he told me:

$this->view is null and can't be assigned this way directly

--- administrator/components/com_chronoforms6/chronoforms/controllers/tables-orig.php   2017-11-15 16:09:15.975282790 +0100
+++ administrator/components/com_chronoforms6/chronoforms/controllers/tables.php 2017-11-15 16:15:18.211323469 +0100
@@ -18,6 +18,9 @@

function _initialize(){
$this->layout('default');
+ $this->view = array();
+ $this->view['views'] = array();
+ $this->view['views']['path'] = array();
$this->view['views']['path'] = \G2\Globals::ext_path('chronofc', 'admin').'themes'.DS.'default';
}
}
M
marijkekovoks
Hello there,

Any news on this issue, my client would love to see his database entries in the admin...

Thanks, kind regards, Marijke
M
marijkekovoks
Hello, anybody out there?
Friendly ping :-D
admin
Hi Marijke,

Apologizes for the late reply, I confirm this is an issue, I think it's because you are running on PHP7, you can use the fix suggested by your developer for now and the next update should be working without a problem.

Thank you and Best regards
Max
If your main question got answered then please mark the answer using the button!​
​Please let us know if you have any problems with the new forums text editor, we appreciate your feedback!
M
marijkekovoks
Hi Max,

That's okay, you must be a busy man.

I can't switch the site back to php5, so I'll just wait for the update of the extension,

Thanks for you answer,

Best regards, Marijke
admin
Hi Marijke,

No problems, you can get an early patch file too, if this is okay then please send me a message using the contact page

Best regards
Max
If your main question got answered then please mark the answer using the button!​
​Please let us know if you have any problems with the new forums text editor, we appreciate your feedback!
M
marijkekovoks
Hi Max,

I sent you a message through the contact page for the patch file, but have not heard back from you, that is okay though. If you say it will be fixed in the next release I will wait for that, no problems :-)
Thanks for you help,

Kind regards, Marijke
jj135
I had the same issue in Chronoforms 6 when opening a table. I added these lines to tables.php:

$this->view = array();
$this->view['views'] = array();
$this->view['views']['path'] = array();

as suggested in this trhead. This solved the issue. Thanks!

Kind regards,
JIp
jj135
Hi! I now can acces / view the database table but I am not able to delete records from the table. When I select one or more items and click on 'remove' I get this error:

1054 Unknown column '' in 'where clause'

See attached screenshot.

Is this actually the way to delete selected (individual) records from the table or does this remove the database table competely?
Attachments
2017-12-01_16-12-22.png
2017-12-01_16-12-22.png
(82.37 KiB)
79 Downloads/Views
jj135
Solved this issue... I did not have an ID (auto increment) column in my table. After adding this everything worked fine.
M
marijkekovoks
Max, I installed the patch files in the right folder on the server last Friday, but that broke the site, so we reverted it.
The site is put up specifically for letting people fill out a form enlist for an event on 7th December, so I can't let it go out of the air at the moment, the client wouldn't like that very much, so we'll just let it go for now and hopefully everything will be hunky dory again in the next version of chronoforms. We'll look out for the update (also on all the other sites we use chronoforms on cause we love it :-)

Thanks for all your help,

Kind Regards, Marijke
admin
Hi Marijke,

Great, a new update is out, could you please download and test it to confirm that it works on your server ? the auto updater is not yet live.

@Jipp, Good catch, the deletion would not work without a primary key field.

Best regards
Max
If your main question got answered then please mark the answer using the button!​
​Please let us know if you have any problems with the new forums text editor, we appreciate your feedback!