• Resolved davidtauriello

    (@davidtauriello)


    We’re running version 5.1.9 as of today, when we received a message from a visitor that this form was just ‘spinning’ – https://xbrl.us/home/about/contact. As of right now, that’s still the case, although a logged in user can submit on this form with no issues.

    We’ve made no changes to the system or plugin for a couple of weeks, and were receiving submissions as late as Sunday morning (Eastern Daylight Time) without an issue from non-logged in users.

    We’re also unable to create a working form from scratch.

    In addition, when editing a form, anytime we click on the form options to insert into the editor, the popup actually lands under the editing window, so it’s not really possible to use.

    Let me know if you have any ideas on how to fix these issues.

    The page I need help with: [log in to see the link]

Viewing 5 replies - 1 through 5 (of 5 total)
  • Thread Starter davidtauriello

    (@davidtauriello)

    this issue affects most forms on our site.

    Plugin Author Takayuki Miyoshi

    (@takayukister)

    What other plugins and theme do you use on the site?

    Thread Starter davidtauriello

    (@davidtauriello)

    Takauyki – thanks for your reply; we’ve identified the first issue (forms not available for users who are not logged in). We have implemented a function (see below) to prevent visitors who are not logged in from seeing user detail like this: https://www.rollingstone.com/wp-json/wp/v2/users

    What WP REST API endpoint is Contact Form 7 using – ? – we’d like to explore the possibility of excluding it from our function.

    The second issue is not resolved – it is related to editing the forms and the popup appearing under the form – here is a picture: https://files.xbrl.us/images/popup-wpcf7-problem.png – let me know if you have any thoughts about this.

    add_filter( 'rest_authentication_errors', function( $result ) {
        // If a previous authentication check was applied,
        // pass that result along without modification.
        if ( true === $result || is_wp_error( $result ) ) {
            return $result;
        }
    
        // No authentication has been performed yet.
        // Return an error if user is not logged in.
        if ( ! is_user_logged_in() ) {
            return new WP_Error(
                'rest_not_logged_in',
                __( 'You are not currently logged in.' ),
                array( 'status' => 401 )
            );
        }
    
        // Our custom authentication check should have no effect
        // on logged-in requests
        return $result;
    }); 
    Thread Starter davidtauriello

    (@davidtauriello)

    Takayuki – it looks like the z-index of the Contact7 popup is exceeded by a class in BadgeOS plugin that we also use, so we’ve added an override to css on the admin side:

    div#contact-form-editor.ui-widget.ui-widget-content {
    	z-index: 99999 !important;
    } 
    Thread Starter davidtauriello

    (@davidtauriello)

    Takayuki – we’ve also updated our function to prevent it from running on /wp-json/contact-form-7 pages, so this support thread can be closed.

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘Forms have stopped working; editor layering problem’ is closed to new replies.