Viewing 4 replies - 1 through 4 (of 4 total)
  • Plugin Contributor Edson Galina Fortes

    (@glx77)

    Hi @lgouaux ,

    hope you’re fine ? Sorry for the issue you’re facing, I’ll check the problem today and get you in touch

    Regards

    Plugin Contributor Edson Galina Fortes

    (@glx77)

    Hi @lgouaux ,

    I’ve investigate and it seems that the amp story format don’t allow to add our custom button due to some tag validation : https://github.com/ampproject/amphtml/blob/main/extensions/amp-story/validator-amp-story.protoascii

    I’ll reach the problem to my ceo to check if we’ll add the feature on a futur version.

    For the moment you can use this filter to disable the button on your amp story :

    function amp_story_callback( $dom ) {
    	$button_services = weglot_get_service('Button_Service_Weglot');
    	$button_html = $button_services->get_html( 'weglot-default' );
    	if(strpos( $dom, '<aside data-wg-notranslate=""' ) !== false) {
    		$dom = preg_replace( '/<aside\b[^>]*>(.*?)<\/aside>/', '', $dom );
    		return $dom;
    	}
    
    }
    add_filter( 'weglot_render_default_button', 'amp_story_callback', 99, 2 );
    

    and add the button directly on your story with our shortcode [weglot_switcher] or div <div id="weglot_here"></div>

    Regards

    Thread Starter lgouaux

    (@lgouaux)

    Thanks. It works

    Hi,

    i have the same issue/errors. With your solution the debug of Google Web Stories goes away but i get new error messages saying that i am unable to save any changes editing the Web Story

    ——
    Unable to save your story
    We are currently unable to save your story, any changes you make may be lost. This may be due to temporary issues connecting to WordPress. Submit a new support topic for additional help.
    ——-

    Thanks in advanced

    • This reply was modified 2 years, 3 months ago by Schnitzelweck.
Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘Google validation issue with webstory (AMP)’ is closed to new replies.