Forum
Having a problem displaying an event
I am trying to set up the events app. I installed the events folder into the root of my site. Listing the events displays fine, but when clicking through to the event I get the event.php page displaying, but not the content? I can see from the DEBUG report that eventSlug is blank, I would expect that to read eventSlug='[date]-[event]' I am missing something really basic, but I just can't see it.
Debug Message
SELECT * FROM perch2_pages WHERE pagePath='/events/event.php' LIMIT 1
SELECT * FROM perch2_events WHERE eventSlug = ''
SELECT * FROM perch2_pages WHERE pageNew=0 AND pageHidden=0 AND pageDepth >=0 AND pageDepth<=1 ORDER BY pageTreePosition ASC
SELECT pageTreePosition FROM perch2_pages WHERE pagePath='/events/event.php' LIMIT 1
Using template: \templates\navigation\item.html
SELECT DISTINCT e.* FROM perch2_events e WHERE eventSlug=''
SELECT DISTINCT settingID, settingValue FROM perch2_settings WHERE userID=0
Using template: \templates\events\listing\event-detail.html
Fetching from cache: perch_events_event_categories9e158a0f6af6022286354fe52a539a46
Cache file not found: perch_events_event_categories9e158a0f6af6022286354fe52a539a46
SELECT * FROM perch2_events WHERE eventSlug = ''
What does the code on your page look like?
Thanks Drew, I wasn't expecting a reply on a Sunday.
The code is just the example pages that come with the app.
I had initially set the event pages up a couple of levels below root and was getting the same problem.
So I copied the events folder 'as is' into root and I am still having the same problem.
List of events is generated on the index.php page by
The event.php page uses
The url generated looks right e.g.,
I have also noticed that the categories do not display either, using
I've tried reinstalling all this a couple of times, but same effect.
You have
?event=
in the URL, but you're usingperch_get('s')
to look for?s=
Thanks Drew, I was using the templates that I downloaded with the app to get the hang of things? I have just checked, the sample templates use
But the output from perch_events_listing() is
Was that an error that I have introduced somewhere?
Thanks , changed perch_get('s') to perch_get('event') and now it works as expected.
That's great. Glad you got it sorted.