Support » Plugin: Yoast Test Helper » Enable the feature flag for the structured data blocks?

  • what is this:
    “Enable the feature flag for the structured data blocks?”
    i didn’t see this option in your screenshot.

    about the sitemap.
    what did you recommend?
    is looks a little scary to do it is can cause SEO isiues.

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

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

    (@123nadav)

    please? i even try send you emails and publish in github:
    https://github.com/Yoast/yoast-test-helper/issues/117

    what is domain drop down? please guys if you can advise what is the normal
    configuration for regular sites in productions.
    domain drop-down need be live? staging?

    JSON schema?
    what you recommended guys?

    Site-map cache? what is recommended if you want your site to operate normally
    and keep the helper with setting for productions site?

    this plugin is not detailed and maybe is impact can be very heavy and not clear.

    Plugin Support Pcosta88

    (@pcosta88)

    We have gone ahead and closed this issue as we have replied here https://wordpress.org/support/topic/instructions-yoast-helper-plugin-for-yoast-plugin/

    • This reply was modified 4 months, 2 weeks ago by Pcosta88.
    Thread Starter 123nadav

    (@123nadav)

    Yeah is see thank you @pcosta88
    but still have more options you didn’t explain as i asked in my previous messages.

    I was happy to hear about them,

    1. What is the cache XML site map? is good? is bad?
    I activate that and try to look on debug mode i didn’t see any difference.

    2. about the schema TLD and exemple.com?
    maybe this option can be on for better SEO generally?

    3. Domain Drop Down maybe need to be local? the “live” option sends requests.
    people want to use the helper, and they have the free Yoast SEO, what about them?

    About Domain Drop Down – (You said to ignore it, but please listen to this:)
    I look on the file himself, some request is actually triggered
    in all these modes.

    I was happy to hear more about this plugin and this option.
    this is a screenshot of what have now:
    https://ibb.co/xjYS6mB

    Is a very useful plugin, if you were explained what he actually does on the main page
    of the plugin, i assure you a lot of people were using him.

    is unclear what have here:
    https://wordpress.org/plugins/yoast-test-helper/

    Nobody, even a developer, will understand what the plugin actually does.
    The explanation of the plugin needs to be more detailed and clear.

    One thing, I must say:
    ( The reset button are very useful we can’t deny it)
    especially now when you add to the Yoast SEO plugin the indexable tables.
    this Helper Plugin must be on any site now.

    Plugin Support Pcosta88

    (@pcosta88)

    Hi,

    Sure! We are happy to respond to the questions about it below. We also understand that we may need to create some better documentation about this plugin. We’ll also create a request with the right team to look into it.

    1. What is the cache XML site map? is good? is bad? I activate that and try to look on debug mode i didn’t see any difference.
    Yoast puts transient caching on the sitemaps. The feature will disable it if selected. Disabling our caching can sometimes fix issues related to the sitemaps. If you are not experiencing an issue with the sitemap, you can leave it unclicked.

    2. about the schema TLD and exemple.com? maybe this option can be on for better SEO generally?
    This feature is for testing schema code in Google’s structured data testing tool. It replaces your .test site domain with example.com for testing structured data. If you do not have that domain you can ignore it and unclick it.

    3. Domain Drop Down maybe need to be local? the “live” option sends requests. people want to use the helper, and they have the free Yoast SEO, what about them?
    The audience for that feature are our premium users in order to test and adjust license checks. Our free users can ignore this as no license is needed to use the free plugin.

    However, can you elaborate more on the requests that the live option is ending? Can you describe them or take a screenshot? You can use a tool like: https://imgbb.com/ to share the image.

    Thread Starter 123nadav

    (@123nadav)

    The File is in this folder:
    /wp-content/plugins/yoast-test-helper/src/domain-dropdown.php

    this is his code (look on line 40 – 55) :

    
    <?php
    
    namespace Yoast\WP\Test_Helper;
    
    /**
     * Sends myYoast requests to a chosen testing domain.
     */
    class Domain_Dropdown implements Integration {
    
    	/**
    	 * Holds our option instance.
    	 *
    	 * @var Option
    	 */
    	private $option;
    
    	/**
    	 * Class constructor.
    	 *
    	 * @param Option $option Our option array.
    	 */
    	public function __construct( Option $option ) {
    		$this->option = $option;
    	}
    
    	/**
    	 * Registers WordPress hooks.
    	 *
    	 * @return void
    	 */
    	public function add_hooks() {
    		\add_action( 'admin_post_yoast_seo_domain_dropdown', [ $this, 'handle_submit' ] );
    
    		$domain = $this->option->get( 'myyoast_test_domain' );
    		if ( ! empty( $domain ) && $domain !== 'https://my.yoast.com' ) {
    			\add_action( 'requests-requests.before_request', [ $this, 'modify_myyoast_request' ], 10, 2 );
    		}
    		else {
    			\remove_action( 'requests-requests.before_request', [ $this, 'modify_myyoast_request' ], 10 );
    		}
    	}
    
    	/**
    	 * Retrieves the controls.
    	 *
    	 * @return string The HTML to use to render the controls.
    	 */
    	public function get_controls() {
    		$select_options = [
    			'https://my.yoast.com'                  => 'live',
    			'https://staging-my.yoast.com'          => 'staging',
    			'https://staging-plugins-my.yoast.com'  => 'staging-plugins',
    			'https://staging-platform-my.yoast.com' => 'staging-platform',
    			'http://my.yoast.test:3000'             => 'local',
    		];
    
    		$output = Form_Presenter::create_select(
    			'myyoast_test_domain',
    			\esc_html__( 'Set the myYoast testing domain to: ', 'yoast-test-helper' ),
    			$select_options,
    			$this->option->get( 'myyoast_test_domain' )
    		);
    
    		return Form_Presenter::get_html( \__( 'Domain Dropdown', 'yoast-test-helper' ), 'yoast_seo_domain_dropdown', $output );
    	}
    
    	/**
    	 * Handles the form submit.
    	 *
    	 * @return void
    	 */
    	public function handle_submit() {
    		if ( \check_admin_referer( 'yoast_seo_domain_dropdown' ) !== false ) {
    			$this->option->set( 'myyoast_test_domain', \filter_input( \INPUT_POST, 'myyoast_test_domain', \FILTER_SANITIZE_STRING ) );
    		}
    
    		\wp_safe_redirect( \self_admin_url( 'tools.php?page=' . \apply_filters( 'Yoast\WP\Test_Helper\admin_page', '' ) ) );
    	}
    
    	/**
    	 * If a testing domain is set, modify any request to myYoast to go to the testing domain.
    	 * Attached to the <code>requests-requests.before_request</code> filter.
    	 *
    	 * @param string $url     URL of the request about to be made.
    	 * @param array  $headers Headers of the request about to be made.
    	 * @return void
    	 */
    	public function modify_myyoast_request( &$url, &$headers ) {
    		$domain = $this->option->get( 'myyoast_test_domain' );
    
    		if ( empty( $domain ) || $domain === 'https://my.yoast.com' ) {
    			return;
    		}
    
    		$original_url       = $url;
    		$request_parameters = $this->replace_domain( $domain, $url, $headers );
    		$url                = $request_parameters['url'];
    
    		if ( $request_parameters['host'] ) {
    			$headers['Host'] = $request_parameters['host'];
    			if ( \defined( 'WP_DEBUG' ) && \WP_DEBUG ) {
    				// phpcs:ignore WordPress.PHP.DevelopmentFunctions.error_log_error_log
    				\error_log( \sprintf( "SANDBOXING via '%s': '%s'", $domain, $original_url ) );
    			}
    		}
    	}
    
    	/**
    	 * Replace the domain of the url with the passed domain for my-yoast urls.
    	 *
    	 * @param string $domain  Testing domain to take place in the request.
    	 * @param string $url     URL of request about to be made.
    	 * @param array  $headers Headers of request about to be made.
    	 * @return array [ 'url' => new URL, 'host' => new Host ]
    	 */
    	private function replace_domain( $domain, $url, $headers ) {
    		$host     = '';
    		$url_host = \wp_parse_url( $url, \PHP_URL_HOST );
    
    		if ( $url_host === 'my.yoast.com' ) {
    			$host = isset( $headers['Host'] ) ? $headers['Host'] : $url_host;
    			$url  = \str_replace( 'https://' . $url_host, $domain, $url );
    		}
    
    		return \compact( 'url', 'host' );
    	}
    }
    

    If you look have requested here in the PHP…
    even if i “ignore” it, still have a PHP request sending to one of these 5 options.
    (line 48 – 55).

    This domain not excited.
    What can lead to soft 404 (is not big deal, is not actually 404 from my domain).
    If you look good you understand have a process of PHP requests here in the PHP
    to your domains.

    the option “local” build for a node.
    Nginx usually can connect this 3000 port but is not POINTLESS with my kind of sites.

    So, for now, I “ignore” (Is not really ignoring but ok)
    I keep it on “live”, but it should be empty or an option for the free Yoast users.

    This will avoid confusion or maybe false request inside the PHP.
    ( can lead to PHP errors )

Viewing 5 replies - 1 through 5 (of 5 total)
  • You must be logged in to reply to this topic.