Front-end editing not working
WordPress Event Management, Calendars & Registration › Forums › Frontend Submissions › Front-end editing not working
This topic contains 12 replies, has 2 voices, and was last updated by Stephen Harris 9 years, 4 months ago.
-
AuthorPosts
-
July 31, 2015 at 3:53 am #18187
Hello,
I’m logged in as the event submitter and would like to edit event details.
When I click on the Edit link (page slug ‘edit-event’) it just refreshes the event page.I’ve set permissions for all user types to be able to “Edit events” (but not others’ events).
I don’t have a page with a slug edit-event. Is it needed? What else am I missing?Thank you for all your prompt responses!
WillowJuly 31, 2015 at 9:08 am #18190Have you enabled front-end editing?
Also, the event you are trying to edit, was it created using FES?
Stephen HarrisJuly 31, 2015 at 11:09 am #18191Yes to both.
WillowJuly 31, 2015 at 11:14 am #18193My apologies, made a mistake:
added the relevant code to functions.php instead of wp-config.php!It worked to edit the event.
Now the only issue is that admin didn’t receive an email notification to approve the revised event.- This reply was modified 9 years, 4 months ago by Willow.
WillowJuly 31, 2015 at 11:44 am #18195Also, the edit form displays two sets of editing fields, or rather repeats the whole thing.
It’s not like the fields are duplicated, each one beside each other.First the fields are printed within the page where the information is displayed, and then again underneath all that.
- This reply was modified 9 years, 4 months ago by Willow.
WillowAugust 1, 2015 at 8:43 am #18205Silly question, but can you double check the ‘notify admin’ setting is enabled for that form (it’s done on form-by-form basis). Does the submitter receive their confirmation e-mail?
Regarding the duplication problem, could you try disabling any other plug-ins temporarily – it sounds like a plug-in conflict. If it still occurs, then try the theme next. If you can identify any particular plug-in(s)/theme which are causing this then I can investigate further.
Stephen HarrisAugust 1, 2015 at 2:35 pm #18209Yes, ‘notify admin’ is checked. The first time, when the event is submitted initially, notification IS sent to the Admin and to the event submitter.
When the event is edited by the organiser/event submitter, it goes into Pending mode again, but notification ISN’T sent. I’m not sure if it’s a bug, or by design, but it would be a bit of a pain to keep checking if any events have been edited if there’s no email notification.
WillowAugust 1, 2015 at 2:54 pm #18211Thought that “Event Manager” and “Event Manager Pro” might be causing the duplicate fields issue (we’re migrating from that to Event Organiser).
I uninstalled both, but the fields are still duplicated on the edit page.Probably an issue with the template. Here’s my custom event-meta-event-single.php :
http://pastebin.com/Damq30yv
(don’t mind the thumbnail bit, that doesn’t work yet, obviously).As for the other plugins, I also suspect Advanced Custom Fields, Advanced Custom Fields Repeater Add-On, and Gravity Forms. Unfortunately we need all of those and I can’t remove them. Have either of these caused issues in the past?
WillowAugust 1, 2015 at 3:00 pm #18212Just to confirm, is if fields that are being repeated – or is the information of the event being displayed below the fields for editing that content? Are you able to provide me with access to the page?
Stephen HarrisAugust 1, 2015 at 8:46 pm #18215I just sent you login information and links via the contact form.
That user/pass is my test event submitter.WillowAugust 1, 2015 at 10:42 pm #18216Thanks!
I think I see what’s happening now:
the_content()
is being called twice on the page.Unless your theme has a
single-event.php
then for the event page,single.php
is used, and the plug-in inserts the contents ofevent-meta-event-single.php
just beforethe_content()
(actually as part of it).So
the_content()
causes the contents ofevent-meta-event-single.php
to be included on teh page – but that file too containsthe_content()
. Thus the event content appears twice on the page (and you can see this when not in edit mode too).In edit mode, since the form replaces the content of the event, you’re seeing the event form twice.
The solution is to either
- Create a
single-event.php
. This can be copy ofsingle.php
withthe_content()
replaced by a line including
event-meta-event-single.php
- Or removing
the_content()
from
event-meta-event-single.php
Stephen HarrisAugust 2, 2015 at 4:34 pm #18218Perhaps I’m missing something, but here’s the current setup and how it works:
1) a custom single-event.php is already in place. It doesn’t have
the_content
, just this:</header><!-- .entry-header --> <div class="entry-content"> <!-- Get event information, see template: event-meta-event-single.php --> <?php eo_get_template_part('event-meta','event-single'); ?> </div><!-- .entry-content -->
2) event-meta-event-single.php does have
the_content
because I need to place it underneath the map and in between some other event details.3) When I remove
the_content
from event-meta-event-single.php, event details that were entered intothe_content
aren’t included when viewing the event page (non-edit mode). However, this does solve the duplicate fields issue when editing the event.Does this make sense?
In short, removing the_content works to fix the duplicate fields on the Edit page, but on the other hand, it removes event details when simply viewing the page.
- This reply was modified 9 years, 4 months ago by Willow.
WillowAugust 4, 2015 at 8:42 pm #18290Just to post an update here, but the issue was found to be the templates calling
the_content()
twice, but this was obscured by the fact that, when removed, the problem appeared to persist because of caching.Stephen Harris -
AuthorPosts