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.

Viewing 13 posts - 1 through 13 (of 13 total)
  • Author
    Posts
  • #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!

    Willow
    #18190

    Have you enabled front-end editing?

    Also, the event you are trying to edit, was it created using FES?

    Stephen Harris
    #18191

    Yes to both.

    Willow
    #18193

    My 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.
    Willow
    #18195

    Also, 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.
    Willow
    #18205

    Silly 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 Harris
    #18209

    Yes, ‘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.

    Willow
    #18211

    Thought 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?

    Willow
    #18212

    Just 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 Harris
    #18215

    I just sent you login information and links via the contact form.
    That user/pass is my test event submitter.

    Willow
    #18216

    Thanks!

    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 of event-meta-event-single.php just before the_content() (actually as part of it).

    So the_content() causes the contents of event-meta-event-single.php to be included on teh page – but that file too contains the_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

    1. Create a single-event.php. This can be copy of single.php
      with the_content() replaced by a line including
      event-meta-event-single.php
    2. Or removing the_content() from
      event-meta-event-single.php
    Stephen Harris
    #18218

    Perhaps 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 into the_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.
    Willow
    #18290

    Just 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
Viewing 13 posts - 1 through 13 (of 13 total)
To enable me to focus on Pro customers, only users who have a valid license for the Pro add-on may post new topics or replies in this forum. If you have a valid license, please log-in or register an account using the e-mail address you purchased the license with. If you don't you can purchase one here. Or there's always the WordPress repository forum.