• Hey,
    I want to create my website AMP, and there are some issues (obviously) :D.
    I installed AMP plugin by Google, but it doesn’t fix all my issues, because most of them are plugin-related.
    I would like to solve these issues on my own and I have some basic knowledge on coding, but I just don’t know where to start with this AMP thing.
    I read Google documents on AMP but I just don’t get it.
    Could anyone point me in the right direction with this particular problem?

    Error code
    DISALLOWED_TAG

    Invalid markup
    <script … >

    Element attributes
    type text/javascript

    Element name
    script

    Parent element
    head

    Text content

    /* <![CDATA[ */
    var sibErrMsg = {"invalidMail":"Please fill out valid email address","requiredField":"Please fill out required fields","invalidDateFormat":"Please fill out valid date format","invalidSMSFormat":"Please fill out valid phone number"};
    var ajax_sib_front_object = {"ajax_url":"https:\/\/www.otterreviews.com\/wp-admin\/admin-ajax.php","ajax_nonce":"259ee6748c","flag_url":"https:\/\/www.otterreviews.com\/wp-content\/plugins\/mailin\/img\/flags\/"};
    /* ]]> */

    Inline Text:
    var sibErrMsg = {“invalidMail”:”Please fill out valid email address”,”requiredField”:”Please fill out required fields”,”invalidDateFormat”:”Please fill out valid date format”,”invalidSMSFormat”:”Please fill out valid phone number”};`

    I located the problematic PHP function:

    function wp_head_ac() {
    			wp_enqueue_script( 'sib-front-js', self::$plugin_url . '/js/mailin-front.js', array( 'jquery' ), filemtime( self::$plugin_dir . '/js/mailin-front.js' ), false );
    			wp_enqueue_style( 'sib-front-css', self::$plugin_url.'/css/mailin-front.css', array(), array(), 'all');
    			wp_localize_script(
    				'sib-front-js', 'sibErrMsg', array(
    					'invalidMail' => __( 'Please fill out valid email address', 'sib_lang' ),
    					'requiredField' => __( 'Please fill out required fields', 'sib_lang' ),
    					'invalidDateFormat' => __( 'Please fill out valid date format', 'sib_lang' ),
                        'invalidSMSFormat' => __( 'Please fill out valid phone number', 'sib_lang' ),
    				)
    			);
                wp_localize_script(
                    'sib-front-js', 'ajax_sib_front_object',
                    array(
                        'ajax_url' => admin_url( 'admin-ajax.php' ),
                        'ajax_nonce' => wp_create_nonce( 'sib_front_ajax_nonce' ),
                        'flag_url' => plugins_url('img/flags/', __FILE__ ),
                    )
                );

    But beyond that, I am lost.

    Thank you for your help.

    • This topic was modified 5 years, 10 months ago by Matic Broz.
    • This topic was modified 5 years, 10 months ago by Jan Dembowski. Reason: Moved to Fixing WordPress, this is not an Developing with WordPress topic

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

Viewing 2 replies - 1 through 2 (of 2 total)
Viewing 2 replies - 1 through 2 (of 2 total)

The topic ‘AMP Errors – Where to start?’ is closed to new replies.