Forums

Inserting Into JEvent Database With Chronoforms6

cyberspyder 26 Jul, 2019
I'm adding events into the JEvent tables with Chronoforms successfully. But whenever I go back to the backend of the JEvent area again, the Timesheet's From area is missing and clicking on the event causes a 403 error. I'm inserting into the jevents_vevdetail, jevents_catmap, jev_customfields, and jevents_vevent tables successfully except for the jevents_vevent's raw data area.

The insertion of events through the form also causes any events made from the backend to disappear on the frontend calendar. Also, the events inserted from the form are not showing up on the frontend either.

I'm not sure if I'm missing an important table or something. Any help with this problem would be greatly appreciated.

I followed previous advice and switched to the easier to use SaveDB now that I know it works with the tables so there's no crazy PHP code this time. Debuggers are active and everything looks fine on the front end and in the database itself, aside from the stated part above.
​[file=http://www.efortsmith.com.php72-2.phx1-2.websitetestlink.com/test-form]Add_Event_Backup[/file]
healyhatman 27 Jul, 2019
1 Likes
Do you have "Auto manage table" turned on? Because if so make sure it's off. Then look at your debug and see what data's going in.
cyberspyder 29 Jul, 2019
Thank you for the help. That managed to solve that issue but now I'm getting the same type of error from trying to upload a picture to use in the event itself. It looks okay on the frontend but when I click the event in the backend, after a bit the frontend stops letting me see event details pages and the backend gives the same 403 error.

I'm not sure if it's related but when you upload an image from the backend, it changes the name of the file to a random set of numbers and letters then a period, with random numbers only, and finally the extension of the image. Any help would be greatly appreciated.
healyhatman 29 Jul, 2019
That doesn't sound right at all, what are you using as your filename provider
cyberspyder 29 Jul, 2019
<<but when you upload an image from the backend, it changes the name of the file to a random set of numbers and letters then a period, with random numbers only, and finally the extension of the image.>> this is using the JEvents Standard Images and Files addon.

In Chronoforms, we were not changing the file name.

I am assuming they use some method of calculating the image name to prevent people over-writing other images, but I am not sure what algorithm they are using and why it breaks when we upload a normally named image.
healyhatman 29 Jul, 2019
It's literally just the date followed by the filename.
cyberspyder 29 Jul, 2019
Well, one example of what we experience - the original filename was factorypure.png and the resulting filename (including path ) is /images/jevents/300x225/5d3f5468269b66.35269832.png
healyhatman 29 Jul, 2019
Sxreenshot of your upload action please
cyberspyder 30 Jul, 2019
Is this the screenshot you needed?
healyhatman 30 Jul, 2019
Yep looks fine, now can I get a look at your save data action
cyberspyder 30 Jul, 2019
Here's the save data that is dealing with the image upload.
healyhatman 30 Jul, 2019
You need to look at the debug for the file upload action and use the data for the actual file name as uploaded. I think it's {var:uploadactionname.fieldname.filename} but have a look
cyberspyder 31 Jul, 2019
I used that except with the right names replaced but it appears to have the same result as when done with the {data:fieldname}.
Backend:
The save data debugger for inserting into the database:
The file upload debugger:
healyhatman 31 Jul, 2019
Looks fine those numbers are the date and time. What does an entry inserted by jevents itself look like in the database?
cyberspyder 31 Jul, 2019
1 and 5 were completely inserted with the jevents backend. 2 and 6 were made originally with the form but I realized if I didn't change the "imagename1" by using the jevents backend that the events would give the not opening error, otherwise they would have the same name for imagename1 as imagetitle1
healyhatman 31 Jul, 2019
So looks like maybe jevents 3xpects a certain format for the filename? You might need to ask them maybe
cyberspyder 01 Aug, 2019
Okay, that's kind of what I was thinking but just figured I'd check both places. Thanks for all the help!
This topic is locked and no more replies can be posted.