Forum
Events not saving to database
Hi. I'm trying to get an events app to play ball.
Every time I try to publish an event it doesn't save. The debug isn't showing anything suspect. There are two events already in the system showing fine.
I have encountered something similar in the past with the blog app and updating the core files or the app usually fixes the issue. Not this time.
Template Code:
<article class="h-entry">
<h2>
<a href="<perch:events id="eventURL" type="hidden" />" rel="bookmark" class="p-name">
<perch:events id="eventTitle" type="text" label="Title" required="true" size="xl autowidth" order="1" />
</a>
</h2>
<p class="meta">
<time class="dt-published" datetime="<perch:events id="postDateTime" type="date" label="Date" time="true" format="Y-m-d H:i:s" divider-before="Meta information" />">
<perch:events id="eventDateTime" type="date" time="true" format="%d %B %Y" /> @ <perch:events id="eventDateTime" type="date" time="true" format="%H %i %s" />
<perch:if exists="category_names">| <perch:events id="category_names" encode="false" /></perch:if>
</time>
</p>
<perch:if exists="image">
<div>
<img src="<perch:events id="image" type="image" label="Image" width="752" height="423" crop="true" order="3" />" alt="<perch:events id="eventTitle" />" class="img-responsive" />
</div><br>
</perch:if>
<div class="description e-content">
<perch:events id="eventDescHTML" type="textarea" label="Description" order="2" editor="markitup" markdown="true" size="xxl autowidth" required="true" />
</div>
</article>
<perch:events id="image" type="image" width="340" height="403" crop="true" suppress="true" />
Debug Message
[1] SELECT u.*, r.* FROM perch2_users u, perch2_user_roles r WHERE u.roleID=r.roleID AND u.userEnabled=1 AND u.userID=1 AND u.userHash='41bc83b930099f885e209b24051af761' LIMIT 1
UPDATE perch2_users SET userHash='06d061a1d1cb9584bfe9be76734d3475' WHERE userID='1'
[43] SELECT p.privKey FROM perch2_user_privileges p
[29] SELECT * FROM (SELECT DISTINCT settingID, settingValue, userID FROM perch2_settings WHERE userID=1 OR userID=0 ORDER BY userID DESC) AS settings GROUP BY settingID, settingValue, userID
[1] SELECT * FROM perch2_events_categories ORDER BY categoryTitle ASC
Using template: /templates/events/event.html
Queries: 6
Memory: 3.8139
What does debug output after posting the form?
It is posted in the original message. The debug seems the same before and after posting. Here it is again:
Memory: 3.8141
Can you edit an existing event?
I tried editing an existing event. Again the changes don't get saved.
Can I see your Diagnostics Report?
Have you completed all required fields int he form before submitting it?
Is there anything in your error log?
Hi Rachel,
There is only two required fields. One for the title and one for body - both are populated.
Diagnostics Report
What does debug output on the page after making an edit to an event?
This is the debug I get after making an edit and saving an existing event:
Is this on your production or dev server?
This is live - production.
Is the same happening in dev?
I've just ran the dev version on my local (Dan and I are on the same team) and the same happens there. I've checked Pages and the Blog App and these allow editing and posting fine – so the issue just seems to be with the Events App.
I've included the Diagnostics Report and Debug from the dev version if it helps (which isn't running the latest version of Perch):
Diagnostics Report
Debug (upon submission of new event post)
Hi Guys,
Just following this up. Clearly this one has us stumped. Is there any other ideas on how this could be remedied?
Thanks for you help.
Dan
Sorry, we don't get notified of updates to a thread by people other than the creator - hence why you've been sat waiting 3 days.
Without any error messages or information to go on, I don't have a suggestion. Obviously the Events app is extremely old. I'll have a dig around and see what I can find.