Forum Replies Created

Viewing 15 replies - 1 through 15 (of 80 total)
  • Thread Starter a1exus

    (@a1exus)

    I checked my sitemap but don’t see my two new ACF post types.

    $ cat ./wp-content/mu-plugins/custom-jetpack-sitemap-20250317.php
    <?php
    /*
    Plugin Name: Dynamic Post Types in Jetpack Sitemap (MU)
    Description: Dynamically includes all registered public post types (including ACF types) in the Jetpack XML sitemap.
    Version: 1.4
    Author: ChatGPT
    */

    if ( ! defined( 'ABSPATH' ) ) {
    exit; // Exit if accessed directly.
    }

    /**
    * Get all registered public post types for Jetpack sitemap.
    *
    * @return array List of valid public post types.
    */
    function get_dynamic_sitemap_post_types() {
    static $cached_types = null;
    if ( is_null( $cached_types ) ) {
    $excluded_post_types = ['attachment', 'revision', 'nav_menu_item'];
    $all_post_types = get_post_types(['public' => true], 'names');
    $cached_types = array_diff($all_post_types, $excluded_post_types);
    }
    return $cached_types;
    }

    /**
    * Add public post types to Jetpack sitemap.
    *
    * @param array $post_types Existing post types in the sitemap.
    * @return array Modified list of post types.
    */
    function dynamic_jetpack_sitemap_post_types( $post_types ) {
    return array_unique(array_merge($post_types, get_dynamic_sitemap_post_types()));
    }

    /**
    * Hook into Jetpack sitemap filter once plugins are fully loaded.
    */
    add_action('plugins_loaded', function() {
    if ( class_exists( 'Jetpack' ) && method_exists( 'Jetpack', 'is_module_active' ) && Jetpack::is_module_active( 'sitemaps' ) ) {
    add_filter( 'jetpack_sitemap_post_types', 'dynamic_jetpack_sitemap_post_types' );
    }
    });
    $
    • This reply was modified 2 days, 17 hours ago by a1exus.
    Thread Starter a1exus

    (@a1exus)

    Hello Swish and thank you for your message, I really appreciate it!

    now, I’ve added the following php code to wp-content/mu-plugins/custom-jetpack-sitemap.php file:

    <?php
    /*
    Plugin Name: Custom Post Types in Jetpack Sitemap (MU)
    Description: Adds "sponsor" post type to the Jetpack sitemap.
    Version: 1.0
    Author: ChatGPT
    */

    if ( ! defined( 'ABSPATH' ) ) {
    exit; // Exit if accessed directly.
    }

    function custom_jetpack_sitemap_post_types( $post_types ) {
    if ( post_type_exists( 'sponsor' ) ) {
    $post_types[] = 'sponsor';
    }
    return $post_types;
    }
    add_filter( 'jetpack_sitemap_post_types', 'custom_jetpack_sitemap_post_types' );

    assuming the code is actually correct, how can one verifies that it actually _is_ working and my custom post_type got into sitemap?

    • This reply was modified 1 month ago by a1exus.
    • This reply was modified 1 month ago by a1exus.
    • This reply was modified 1 month ago by a1exus.
    Thread Starter a1exus

    (@a1exus)

    this isn’t entirely true, however the correct answer is:

    one must maintain 3 order a month threshold, otherwise Amazon WILL disable your API key

    Thread Starter a1exus

    (@a1exus)

    please follow my link: https://photos.app.goo.gl/LnysV7dDXv7HrrFE7

    • This reply was modified 8 months, 2 weeks ago by a1exus.
    Thread Starter a1exus

    (@a1exus)

    update: i’m still seeing quite a few of

    This item was added to your site after the most recent scan. We will check for threats during the next scheduled one.

    even though i haven’t added anything (other than content), yet jetpack thinks otherwise..

    Thread Starter a1exus

    (@a1exus)

    Thank you for looking into this for me, I really appreciate that!

    Is there a way for an average Joe to see that magical sync status with Jetpack somehow/somewhere? I hear awful a lot about that lately and it seems like me banging my head against the wall could have been something to do with Jetpack’ syncing issues, which again would be super helpful to see (probably would makes sense to incorporate that into main Dashboard in my opinion, or maybe i just didn’t find it)

    • This reply was modified 9 months ago by a1exus.
    Thread Starter a1exus

    (@a1exus)

    the error is no longer present, maybe the message was cached…

    • This reply was modified 9 months, 1 week ago by a1exus.
    Thread Starter a1exus

    (@a1exus)

    ha! i actually just found Cloudflare feature

    Always use HTTPS

    Reply to all requests for URLs that use “http” with a 301 redirect to the equivalent “https” URL. If you only want to redirect for a subset of requests, consider creating an “Always use HTTPS” page rule.

    so I toggle it and now it’s enabled ?? and now I have this

    % curl -I https://youarebetter.com/
    HTTP/1.1 301 Moved Permanently
    Date: Wed, 05 Jun 2024 19:46:34 GMT
    Content-Type: text/html
    Content-Length: 167
    Connection: keep-alive
    Cache-Control: max-age=3600
    Expires: Wed, 05 Jun 2024 20:46:34 GMT
    Location: https://youarebetter.com/
    Report-To: {"endpoints":[{"url":"https:\/\/a.nel.cloudflare.com\/report\/v4?s=dPNYSNabVa1%2FwWsC%2BH%2BtfrEYKDtwliYsJMETGWH9dyJgdvz2%2BZvXxKa%2BJ7tMaHF88RKhWfcFr%2BgkIO6CnkL0j%2BkYPnUO3OZj9Dkps809ZpJqdVJwHtP9B5XS6DP%2FXTYD3TjV"}],"group":"cf-nel","max_age":604800}
    NEL: {"success_fraction":0,"report_to":"cf-nel","max_age":604800}
    Server: cloudflare
    CF-RAY: 88f2ab652c18ab1c-YYZ
    alt-svc: h3=":443"; ma=86400
    
    %
    • This reply was modified 9 months, 2 weeks ago by a1exus.
    Thread Starter a1exus

    (@a1exus)

    CloudFlare listens to both http (port:80) and https (port:443), and within wordpress home and siteurl both already set for https and not http:

    [alexus@jj ~/youarebetter.com/wordpress]$ wp option get home
    https://youarebetter.com
    [alexus@jj ~/youarebetter.com/wordpress]$ wp option get siteurl
    https://youarebetter.com
    [alexus@jj ~/youarebetter.com/wordpress]$ 

    Thread Starter a1exus

    (@a1exus)

    I’m using latest / stable PHP 8.3.6 which is available for my OS w/ libxml 2.11.7.

    Thread Starter a1exus

    (@a1exus)

    this is self-host, so I’m my own hosting provider and PHP IS configured properly, as phpinfo(); wouldn’t return XML Support active it that wasn’t the case..

    Thread Starter a1exus

    (@a1exus)

    i’ve tried with developer mode enabled (to bypass caching all together) yet i still get

    An error occurred. Please try again.

    Thread Starter a1exus

    (@a1exus)

    i’m a bit confused with new “Rules” page, as when I tried to add my rule

    (starts_with(http.request.uri.path, "/wp-login.php")) or (starts_with(http.request.uri.path, "/wp-admin")) or (starts_with(http.request.uri.path, "/xmlrpc.php")) or (starts_with(http.request.uri.path, "/wp-json/")) or (starts_with(http.request.uri.path, "/jetpack/v4/")) or (starts_with(http.request.uri.path, "/wpcom/v2/"))

    there is no place for me to add any of IPs, the only thing I get to choose from is:
    Automatic HTTPS Rewrites – Turn on or off the Cloudflare Automatic HTTPS Rewrites feature available in SSL/TLS > Edge Certificates tab.
    Auto Minify Deprecated – Select which file extensions to minify automatically.
    Browser Integrity Check – Turn on or off the Browser Integrity Check feature available in Security > Settings tab.
    Disable Apps – Turn off all active Cloudflare Apps.
    Disable Real User Monitoring (RUM) – Turn off collecting page load performance information from browsers used by Analytics & Logs > Web Analytics feature.
    Disable Zaraz –
    Hotlink Protection – Turn on or off the Hotlink Protection feature of the Cloudflare Scrape Shield app.
    Email Obfuscation – Turn on or off the Cloudflare Email Obfuscation feature of the Cloudflare Scrape Shield app.
    Fonts – Turn on or off the Cloudflare Fonts feature that rewrites Google Fonts to be delivered from a website’s own origin, eliminating the need to rely on third-party font providers.
    Opportunistic Encryption – Turn on or off the Cloudflare Opportunistic Encryption feature available in SSL/TLS > Edge Certificates tab.
    Rocket Loader – Turn on or off the Cloudflare Rocket Loader feature in the Cloudflare Speed app.
    Security Level – Configure the Security Level setting available in Security > Settings tab.
    Server Side Excludes (optional)Deprecated – Turn on or off the Server Side Excludes feature of the Cloudflare Scrape Shield app.
    SSL (optional) – Configure SSL settings available in SSL/TLS > Overview tab.

    unless I’m missing something, neither seems relevant to me..

    REF: https://developers.cloudflare.com/rules/configuration-rules/

    yet “Cache Rules” in CloudFlare may be what I’m looking for..

    REF: https://developers.cloudflare.com/cache/how-to/cache-rules/

    I configure cache rule

    (starts_with(http.request.uri.path, "/wp-login.php")) or (http.request.uri.path contains "/wp-admin") or (http.request.uri.path contains "/xmlrpc.php") or (http.request.uri.path contains "/wp-json/") or (http.request.uri.path contains "/jetpack/v4/") or (http.request.uri.path contains "/wpcom/v2/")

    and then “Bypass cache”

    oh and where did you say you saw my site is using http instead of https ?

    • This reply was modified 9 months, 3 weeks ago by a1exus.
    • This reply was modified 9 months, 3 weeks ago by a1exus.
    Thread Starter a1exus

    (@a1exus)

    hey Bruce, i appreciate your trying to help me ??

    the guide that you referring to me comes down to this tool Debug – Jetpack Tools

    and while xmlrpc.php seems to be responding just fine using curl

    alexus@mm ~ % curl -vIXPOST https://youarebetter.com/xmlrpc.php
    * Host youarebetter.com:443 was resolved.
    * IPv6: (none)
    * IPv4: 104.21.38.224, 172.67.140.58
    *   Trying 104.21.38.224:443...
    * Connected to youarebetter.com (104.21.38.224) port 443
    * ALPN: curl offers h2,http/1.1
    * (304) (OUT), TLS handshake, Client hello (1):
    *  CAfile: /etc/ssl/cert.pem
    *  CApath: none
    * (304) (IN), TLS handshake, Server hello (2):
    * (304) (IN), TLS handshake, Unknown (8):
    * (304) (IN), TLS handshake, Certificate (11):
    * (304) (IN), TLS handshake, CERT verify (15):
    * (304) (IN), TLS handshake, Finished (20):
    * (304) (OUT), TLS handshake, Finished (20):
    * SSL connection using TLSv1.3 / AEAD-CHACHA20-POLY1305-SHA256 / [blank] / UNDEF
    * ALPN: server accepted h2
    * Server certificate:
    *  subject: CN=youarebetter.com
    *  start date: May 22 21:23:03 2024 GMT
    *  expire date: Aug 20 21:23:02 2024 GMT
    *  subjectAltName: host "youarebetter.com" matched cert's "youarebetter.com"
    *  issuer: C=US; O=Google Trust Services LLC; CN=GTS CA 1P5
    *  SSL certificate verify ok.
    * using HTTP/2
    * [HTTP/2] [1] OPENED stream for https://youarebetter.com/xmlrpc.php
    * [HTTP/2] [1] [:method: POST]
    * [HTTP/2] [1] [:scheme: https]
    * [HTTP/2] [1] [:authority: youarebetter.com]
    * [HTTP/2] [1] [:path: /xmlrpc.php]
    * [HTTP/2] [1] [user-agent: curl/8.6.0]
    * [HTTP/2] [1] [accept: */*]
    > POST /xmlrpc.php HTTP/2
    > Host: youarebetter.com
    > User-Agent: curl/8.6.0
    > Accept: */*
    >
    < HTTP/2 200
    HTTP/2 200
    < date: Mon, 27 May 2024 18:49:23 GMT
    date: Mon, 27 May 2024 18:49:23 GMT
    < content-type: text/xml; charset=UTF-8
    content-type: text/xml; charset=UTF-8
    < x-powered-by: PHP/8.3.6
    x-powered-by: PHP/8.3.6
    < cf-cache-status: DYNAMIC
    cf-cache-status: DYNAMIC
    < report-to: {"endpoints":[{"url":"https:\/\/a.nel.cloudflare.com\/report\/v4?s=0FXoDzIngRe9HogmYnIBa9spSxAD%2B7hC2qdEQeeg4B6L8EeJda4UvQw8ugv2LJS8w2pNOfhBQMo13UvRnUmdkOoYz3V6t6r6ZWx1St1zUJ%2BhPGF%2BaZfk421ewSR7YQEvLUFe"}],"group":"cf-nel","max_age":604800}
    report-to: {"endpoints":[{"url":"https:\/\/a.nel.cloudflare.com\/report\/v4?s=0FXoDzIngRe9HogmYnIBa9spSxAD%2B7hC2qdEQeeg4B6L8EeJda4UvQw8ugv2LJS8w2pNOfhBQMo13UvRnUmdkOoYz3V6t6r6ZWx1St1zUJ%2BhPGF%2BaZfk421ewSR7YQEvLUFe"}],"group":"cf-nel","max_age":604800}
    < nel: {"success_fraction":0,"report_to":"cf-nel","max_age":604800}
    nel: {"success_fraction":0,"report_to":"cf-nel","max_age":604800}
    < server: cloudflare
    server: cloudflare
    < cf-ray: 88a82f3efc3b9ae6-MIA
    cf-ray: 88a82f3efc3b9ae6-MIA
    < alt-svc: h3=":443"; ma=86400
    alt-svc: h3=":443"; ma=86400
    
    <
    * Connection #0 to host youarebetter.com left intact
    curl: (8) Weird server reply
    alexus@mm ~ %

    the Jetpack Debug seems to think otherwise, and because of that I’m unable to activate Jetpack plugin using my fresh vanilla wordpress installation, while cloudflare plugin is activated and php-xml is installed.

    oh and Use Jetpack and Cloudflare on your WordPress?site – the very first step in this guide has been deprecated by Cloudflare.

    <strong class=””>Page Rules are deprecated. You should consider alternative?Rules?options due to their enhanced configurability. Refer to?the migration guide?for details.

    Page Rules migration guide · Cloudflare Rules docs
    Thread Starter a1exus

    (@a1exus)

    alexus@mm ~ % curl -vXPOST https://youarebetter.com/xmlrpc.php
    * Host youarebetter.com:443 was resolved.
    * IPv6: 2606:4700:3033::6815:26e0, 2606:4700:3036::ac43:8c3a
    * IPv4: 172.67.140.58, 104.21.38.224
    *   Trying 172.67.140.58:443...
    * Connected to youarebetter.com (172.67.140.58) port 443
    * ALPN: curl offers h2,http/1.1
    * (304) (OUT), TLS handshake, Client hello (1):
    *  CAfile: /etc/ssl/cert.pem
    *  CApath: none
    * (304) (IN), TLS handshake, Server hello (2):
    * (304) (IN), TLS handshake, Unknown (8):
    * (304) (IN), TLS handshake, Certificate (11):
    * (304) (IN), TLS handshake, CERT verify (15):
    * (304) (IN), TLS handshake, Finished (20):
    * (304) (OUT), TLS handshake, Finished (20):
    * SSL connection using TLSv1.3 / AEAD-CHACHA20-POLY1305-SHA256 / [blank] / UNDEF
    * ALPN: server accepted h2
    * Server certificate:
    *  subject: CN=youarebetter.com
    *  start date: May 22 21:23:03 2024 GMT
    *  expire date: Aug 20 21:23:02 2024 GMT
    *  subjectAltName: host "youarebetter.com" matched cert's "youarebetter.com"
    *  issuer: C=US; O=Google Trust Services LLC; CN=GTS CA 1P5
    *  SSL certificate verify ok.
    * using HTTP/2
    * [HTTP/2] [1] OPENED stream for https://youarebetter.com/xmlrpc.php
    * [HTTP/2] [1] [:method: POST]
    * [HTTP/2] [1] [:scheme: https]
    * [HTTP/2] [1] [:authority: youarebetter.com]
    * [HTTP/2] [1] [:path: /xmlrpc.php]
    * [HTTP/2] [1] [user-agent: curl/8.6.0]
    * [HTTP/2] [1] [accept: */*]
    > POST /xmlrpc.php HTTP/2
    > Host: youarebetter.com
    > User-Agent: curl/8.6.0
    > Accept: */*
    >
    < HTTP/2 200
    < date: Sun, 26 May 2024 17:48:46 GMT
    < content-type: text/xml; charset=UTF-8
    < x-powered-by: PHP/8.3.6
    < cf-cache-status: DYNAMIC
    < report-to: {"endpoints":[{"url":"https:\/\/a.nel.cloudflare.com\/report\/v4?s=VOA8a7Bd7lqGdZKrzoufv9s4%2FqcISdSBmxYbgSPYWW67mjhzhwiebCvv%2FLbewapYoz269mBcdp%2BkOtx2C6FF4GneuxWrsWEgHy2pElz5nRNurmeH9W%2Bv%2FlB6C6Ybc0HqT8Ze"}],"group":"cf-nel","max_age":604800}
    < nel: {"success_fraction":0,"report_to":"cf-nel","max_age":604800}
    < server: cloudflare
    < cf-ray: 889f99160f558dde-MIA
    < alt-svc: h3=":443"; ma=86400
    <
    <?xml version="1.0" encoding="UTF-8"?>
    <methodResponse>
      <fault>
        <value>
          <struct>
            <member>
              <name>faultCode</name>
              <value><int>-32700</int></value>
            </member>
            <member>
              <name>faultString</name>
              <value><string>parse error. not well formed</string></value>
            </member>
          </struct>
        </value>
      </fault>
    </methodResponse>
    * Connection #0 to host youarebetter.com left intact
    alexus@mm ~ %
Viewing 15 replies - 1 through 15 (of 80 total)