• Resolved getnoticedlocally

    (@getnoticedlocally)


    All the URLs on my website, except for WooCommerce URLs, force a trailing slash at the end.

    For example, for a normal page like Contact Us, when I go to /contact (i.e. without a trailing slash) it redirects to /contact/

    But all WooCommerce URLs (such as shop base and product categories etc) load both with and without a trailing slash – so if I got to /shop for example it loads on that URL (doesn’t automatically redirect to /shop/). So the same page loads on both /shop and /shop/

    Any ideas why this is happening and how I fix it?

Viewing 9 replies - 1 through 9 (of 9 total)
  • Hi @getnoticedlocally

    Thanks for reaching out!

    You can change the permalink structure of your site under Settings > Permalinks:

    Can you please try to use Custom base and see if this works?

    Otherwise, then, please try to switch to the default Storefront theme and only WooCommerce plugin is enabled and see if this resolves the issue?

    If so, then this kind of problem is usually caused by your theme or a third-party plugin present on your site. We can run a conflict test to verify this. I’d recommend cloning your site to a staging environment and performing the tests described on this guide without modifying your live site or impacting customers. Many hosts provide staging facilities, so it’s worth checking in with them. It’s also possible to do it using the free WP Staging plugin.

    If this was caused by a third-party plugin present on your site, it would be best to reach out to the developers for further assistance here.

    If this did not resolve the issue, please share your System Status Report, that will help us further troubleshoot.

    You can find it via WooCommerce > Status. Select Get system report and then Copy for support. Once you’ve done that, you can paste it into your reply here.

    If you could also provide the fatal error logs (if any) under WooCommerce > Status > Logs.

    Let us know how it goes!

    Thread Starter getnoticedlocally

    (@getnoticedlocally)

    Hi, thanks for your reply. I’m already using Custom base on this website and have it set to “/lodge/” . I notice in your screenshot you don’t have a forward slash before “product/” , so should my Custom base be “lodge/” rather than “/lodge/”. Would this affect it?

    Hi @getnoticedlocally

    so should my Custom base be “lodge/” rather than “/lodge/”. Would this affect it?

    I apologize as to why on my screenshot there was no slash at the beginning. Please add it on your site and see if this works?

    Thread Starter getnoticedlocally

    (@getnoticedlocally)

    Hi, it is already set to /lodge/ and this has the issue with URL’s not forcing trailing slash

    Hi @getnoticedlocally

    I understand that the issue still persists even after changing the permalinks on your site.

    To better picture what you are referring to here, can you please share with us a clear screenshot of what you see on your end so that we could address you more effectively?

    If you don’t already have a screenshot service installed, you can try https://snipboard.io or https://skitch.com/. You can share the direct link to the image as a response to this topic.

    Additionally, please provide a clear screenshot of the Permalink Settings on your site.

    Thanks!

    Thread Starter getnoticedlocally

    (@getnoticedlocally)

    Hi – first 2 images show the same page/url displaying with and without the trailing slash. Last image shows permalink settings.

    https://ibb.co/ypRhw3Q
    https://ibb.co/MPh0712
    https://ibb.co/twRCmXb

    Thread Starter getnoticedlocally

    (@getnoticedlocally)

    Hi @getnoticedlocally

    Thanks for sharing the screenshots above.

    I checked your site, browsed thru several pages and these pages contain trailing slash at the end of the URLs.

    Can you please confirm if the issue is happening to all your pages after changing the Permalink Settings?

    I’d like to understand your site properly, please share your System Status Report that you can find via WooCommerce > Status. Select Get system report and then Copy for support. Once you’ve done that, you can paste it into your reply here.

    If you could also provide the fatal error logs (if any) under WooCommerce > Status > Logs.

    Thanks!

    Thread Starter getnoticedlocally

    (@getnoticedlocally)

    Hi, thanks. When you are on these pages, if you remove the slash from the url and hit enter, it loads the page without trailing slash. Whereas if you are on a normal page such as Contact Us and remove the trailing slash and hit enter, it redirects back to the trailing slash. So behaviour is different for WooCommerce vs normal pages.

    System report:

    WordPress Environment
    
    WordPress address (URL): https://www.westfieldcountrypark.co.uk/wp
    Site address (URL): https://www.westfieldcountrypark.co.uk
    WC Version: 7.3.0
    REST API Version: ? 7.3.0
    WC Blocks Version: ? 9.1.5
    Action Scheduler Version: ? 3.4.0
    Log Directory Writable: ?
    WP Version: 6.1.1
    WP Multisite: –
    WP Memory Limit: 8 GB
    WP Debug Mode: –
    WP Cron: –
    Language: en_GB
    External object cache: ? Server Environment Server Info: nginx/1.21.6
    PHP Version: 7.4.28
    PHP Post Max Size: 128 MB
    PHP Time Limit: 180
    PHP Max Input Vars: 3000
    cURL Version: 7.29.0
    NSS/3.53.1 SUHOSIN Installed: –
    MySQL Version: 5.5.5-10.0.38-MariaDB
    Max Upload Size: 128 MB
    Default Timezone is UTC: ?
    fsockopen/cURL: ?
    SoapClient: ?
    DOMDocument: ?
    GZip: ?
    Multibyte String: ?
    Remote Post: ?
    Remote Get: ? Database WC Database Version: 7.3.0
    WC Database Prefix: wp_
    Total Database Size: 48.93MB
    Database Data Size: 39.69MB
    Database Index Size: 9.24MB
    wp_woocommerce_sessions: Data: 0.02MB + Index: 0.02MB + Engine InnoDB
    wp_woocommerce_api_keys: Data: 0.02MB + Index: 0.03MB + Engine InnoDB
    wp_woocommerce_attribute_taxonomies: Data: 0.02MB + Index: 0.02MB + Engine InnoDB
    wp_woocommerce_downloadable_product_permissions: Data: 0.02MB + Index: 0.06MB + Engine InnoDB
    wp_woocommerce_order_items: Data: 0.02MB + Index: 0.02MB + Engine InnoDB
    wp_woocommerce_order_itemmeta: Data: 0.02MB + Index: 0.03MB + Engine InnoDB
    wp_woocommerce_tax_rates: Data: 0.02MB + Index: 0.06MB + Engine InnoDB
    wp_woocommerce_tax_rate_locations: Data: 0.02MB + Index: 0.03MB + Engine InnoDB
    wp_woocommerce_shipping_zones: Data: 0.02MB + Index: 0.00MB + Engine InnoDB
    wp_woocommerce_shipping_zone_locations: Data: 0.02MB + Index: 0.03MB + Engine InnoDB
    wp_woocommerce_shipping_zone_methods: Data: 0.02MB + Index: 0.00MB + Engine InnoDB
    wp_woocommerce_payment_tokens: Data: 0.02MB + Index: 0.02MB + Engine InnoDB
    wp_woocommerce_payment_tokenmeta: Data: 0.02MB + Index: 0.03MB + Engine InnoDB
    wp_woocommerce_log: Data: 0.02MB + Index: 0.02MB + Engine InnoDB
    wp_actionscheduler_actions: Data: 0.08MB + Index: 0.13MB + Engine InnoDB
    wp_actionscheduler_claims: Data: 0.02MB + Index: 0.02MB + Engine InnoDB
    wp_actionscheduler_groups: Data: 0.02MB + Index: 0.02MB + Engine InnoDB
    wp_actionscheduler_logs: Data: 0.05MB + Index: 0.03MB + Engine InnoDB
    wp_awb_critical_css: Data: 0.31MB + Index: 0.02MB + Engine InnoDB
    wp_commentmeta: Data: 0.02MB + Index: 0.03MB + Engine InnoDB
    wp_comments: Data: 0.02MB + Index: 0.09MB + Engine InnoDB
    wp_fusion_forms: Data: 0.02MB + Index: 0.03MB + Engine InnoDB
    wp_fusion_form_entries: Data: 0.02MB + Index: 0.02MB + Engine InnoDB
    wp_fusion_form_fields: Data: 0.02MB + Index: 0.02MB + Engine InnoDB
    wp_fusion_form_submissions: Data: 0.02MB + Index: 0.02MB + Engine InnoDB
    wp_links: Data: 0.02MB + Index: 0.02MB + Engine InnoDB
    wp_options: Data: 1.17MB + Index: 0.06MB + Engine InnoDB
    wp_postmeta: Data: 29.56MB + Index: 6.00MB + Engine InnoDB
    wp_posts: Data: 6.52MB + Index: 0.94MB + Engine InnoDB
    wp_redirection_404: Data: 0.02MB + Index: 0.05MB + Engine InnoDB
    wp_redirection_groups: Data: 0.02MB + Index: 0.03MB + Engine InnoDB
    wp_redirection_items: Data: 0.02MB + Index: 0.09MB + Engine InnoDB
    wp_redirection_logs: Data: 0.02MB + Index: 0.05MB + Engine InnoDB
    wp_say_what_strings: Data: 0.02MB + Index: 0.00MB + Engine InnoDB
    wp_search_filter_cache: Data: 0.05MB + Index: 0.09MB + Engine InnoDB
    wp_search_filter_term_results: Data: 0.02MB + Index: 0.09MB + Engine InnoDB
    wp_snippets: Data: 0.02MB + Index: 0.03MB + Engine InnoDB
    wp_termmeta: Data: 0.06MB + Index: 0.03MB + Engine InnoDB
    wp_terms: Data: 0.02MB + Index: 0.03MB + Engine InnoDB
    wp_term_relationships: Data: 0.17MB + Index: 0.11MB + Engine InnoDB
    wp_term_taxonomy: Data: 0.02MB + Index: 0.03MB + Engine InnoDB
    wp_tm_taskmeta: Data: 0.02MB + Index: 0.03MB + Engine InnoDB
    wp_tm_tasks: Data: 0.02MB + Index: 0.02MB + Engine InnoDB
    wp_usermeta: Data: 0.11MB + Index: 0.03MB + Engine InnoDB
    wp_users: Data: 0.02MB + Index: 0.05MB + Engine InnoDB
    wp_wc_admin_notes: Data: 0.08MB + Index: 0.00MB + Engine InnoDB
    wp_wc_admin_note_actions: Data: 0.06MB + Index: 0.02MB + Engine InnoDB
    wp_wc_category_lookup: Data: 0.02MB + Index: 0.00MB + Engine InnoDB
    wp_wc_customer_lookup: Data: 0.02MB + Index: 0.03MB + Engine InnoDB
    wp_wc_download_log: Data: 0.02MB + Index: 0.03MB + Engine InnoDB
    wp_wc_order_coupon_lookup: Data: 0.02MB + Index: 0.03MB + Engine InnoDB
    wp_wc_order_product_lookup: Data: 0.02MB + Index: 0.06MB + Engine InnoDB
    wp_wc_order_stats: Data: 0.02MB + Index: 0.05MB + Engine InnoDB
    wp_wc_order_tax_lookup: Data: 0.02MB + Index: 0.03MB + Engine InnoDB
    wp_wc_product_attributes_lookup: Data: 0.02MB + Index: 0.02MB + Engine InnoDB
    wp_wc_product_download_directories: Data: 0.02MB + Index: 0.02MB + Engine InnoDB
    wp_wc_product_meta_lookup: Data: 0.02MB + Index: 0.09MB + Engine InnoDB
    wp_wc_rate_limits: Data: 0.02MB + Index: 0.02MB + Engine InnoDB
    wp_wc_reserved_stock: Data: 0.02MB + Index: 0.00MB + Engine InnoDB
    wp_wc_tax_rate_classes: Data: 0.02MB + Index: 0.02MB + Engine InnoDB
    wp_wc_webhooks: Data: 0.02MB + Index: 0.02MB + Engine InnoDB
    wp_wpfingerprint_checksums: Data: 0.25MB + Index: 0.00MB + Engine InnoDB
    wp_wpfingerprint_diffs: Data: 0.02MB + Index: 0.00MB + Engine InnoDB
    wp_yoast_indexable: Data: 0.09MB + Index: 0.09MB + Engine InnoDB
    wp_yoast_indexable_hierarchy: Data: 0.02MB + Index: 0.05MB + Engine InnoDB
    wp_yoast_migrations: Data: 0.02MB + Index: 0.02MB + Engine InnoDB
    wp_yoast_primary_term: Data: 0.02MB + Index: 0.03MB + Engine InnoDB
    wp_yoast_seo_links: Data: 0.05MB + Index: 0.03MB + Engine InnoDB
    wp_yoast_seo_meta: Data: 0.02MB + Index: 0.00MB + Engine InnoDB Post Type Counts acf-field: 8
    acf-field-group: 1
    attachment: 541
    flamingo_contact: 2495
    flamingo_inbound: 3389
    fusion_element: 7
    fusion_tb_layout: 3
    fusion_tb_section: 5
    fusion_template: 2
    jetpack_migration: 2
    nav_menu_item: 41
    oembed_cache: 80
    page: 23
    popup: 1
    popup_theme: 8
    post: 2
    postman_sent_mail: 250
    product: 49
    revision: 83
    search-filter-widget: 1
    wpcf7_contact_form: 1 Security Secure connection (HTTPS): ?
    Hide errors from visitors: ? Active Plugins (30) Advanced Custom Fields PRO: by WP Engine – 6.0.7
    Akismet Anti-Spam: by Automattic – 5.0.2
    Autoptimize: by Frank Goossens (futtta) – 3.1.5
    Classic Editor: by WordPress Contributors – 1.6.2
    Classic Widgets: by WordPress Contributors – 0.3
    Code Snippets: by Code Snippets Pro – 3.2.2
    Honeypot for Contact Form 7: by Nocean – 2.1.1
    Contact Form 7: by Takayuki Miyoshi – 5.7.3
    Disable Comments: by WPDeveloper – 2.4.3
    Disable WordPress Core Update Email: by Alex Moss – 1.0
    Disable Plugin Autoupdate Emails: by Shaun Simmons – 1.1.1
    Duplicate Widgets: by themesfactory – 1.2
    Flamingo: by Takayuki Miyoshi – 2.3
    Avada Builder: by ThemeFusion – 3.9.2
    Avada Core: by ThemeFusion – 5.9.2
    Head, Footer and Post Injections: by Stefano Lissa – 3.2.5
    Jetpack: by Automattic – 11.8
    Current Year and Copyright Shortcodes: by David Gewirtz – 1.0.2
    Login Logo: by Mark Jaquith – 0.10.2
    Post SMTP: by Post SMTP – 2.3.2
    Redirection: by John Godley – 5.3.9
    reSmush.it Image Optimizer: by reSmush.it – 0.4.11
    Search & Filter Pro: by Code Amp – 2.5.13
    Hosting Tools: by 34SP.com – 2.4.4
    Velvet Blues Update URLs: by VelvetBlues.com – 3.2.10
    WebP Express: by Bj?rn Rosell – 0.25.5
    WooCommerce: by Automattic – 7.3.0
    Yoast SEO: by Team Yoast – 20.1
    Custom Body Class: by Andrei Lupu – 0.7.3
    WP Fingerprint: by 34SP.com – 2.1.2 Inactive Plugins (14) All-in-One WP Migration: by ServMask – 7.70
    All-in-One WP Migration Unlimited Extension: by ServMask – 2.48
    Auto temp.link: by 34SP.com – 0.0.3
    Coming Soon Page, Maintenance Mode, Landing Pages & WordPress Website Builder by SeedProd: by SeedProd – 6.15.7
    Duplicate Page: by mndpsingh287 – 4.5.1
    Imsanity: by Exactly WWW – 2.8.2
    MMWD Remove Add To Cart for WooCommerce: by McGregor Media Web Design – 1.4.19
    myStickymenu: by Premio – 2.6.2
    Permalink Manager for WooCommerce: by BeRocket – 1.0.8
    Popup Maker: by Popup Maker – 1.17.1
    Premmerce Permalink Manager for WooCommerce: by Premmerce – 2.3.8
    Widget CSS Classes: by Jory Hogeveen – 1.5.4.1
    WP-Optimize - Clean, Compress, Cache: by David Anderson
    Ruhani Rabin
    Team Updraft – 3.2.12 Yoast Test Helper: by Team Yoast – 1.17 Dropin Plugins (2) advanced-cache.php: advanced-cache.php
    object-cache.php: 34SP.com WP Redis Settings API Enabled: –
    Force SSL: –
    Currency: GBP (£)
    Currency Position: left
    Thousand Separator: ,
    Decimal Separator: .
    Number of Decimals: 2
    Taxonomies: Product Types: external (external)
    grouped (grouped)
    simple (simple)
    variable (variable) Taxonomies: Product Visibility: exclude-from-catalog (exclude-from-catalog)
    exclude-from-search (exclude-from-search)
    featured (featured)
    outofstock (outofstock)
    rated-1 (rated-1)
    rated-2 (rated-2)
    rated-3 (rated-3)
    rated-4 (rated-4)
    rated-5 (rated-5) Connected to WooCommerce.com: –
    Enforce Approved Product Download Directories: –
    Order datastore: WC_Order_Data_Store_CPT WC Pages Shop base: #692 - /shop/
    Basket: ? Page ID is set
    but the page does not exist Checkout: ? Page ID is set
    but the page does not exist My account: ? Page ID is set
    but the page does not exist Terms and conditions: ? Page not set Theme Name: Avada Child
    Version: 1.0.0
    Author URL: https://theme-fusion.com
    Child Theme: ?
    Parent Theme Name: Avada
    Parent Theme Version: 7.9.2
    Parent Theme Author URL: https://themeforest.net/user/ThemeFusion
    WooCommerce Support: ? Templates Overrides: Avada/woocommerce/cart/cart.php
    Avada/woocommerce/checkout/form-pay.php
    Avada/woocommerce/checkout/review-order.php
    Avada/woocommerce/checkout/thankyou.php
    Avada/woocommerce/loop/loop-start.php
    Avada/woocommerce/single-product/add-to-cart/variable.php
    Avada/woocommerce/single-product/short-description.php
    Avada/woocommerce/single-product/tabs/additional-information.php
    Avada/woocommerce/single-product/tabs/description.php Admin Enabled Features: activity-panels
    analytics
    coupons
    customer-effort-score-tracks
    experimental-products-task
    experimental-import-products-task
    experimental-fashion-sample-products
    shipping-smart-defaults
    shipping-setting-tour
    homescreen
    marketing
    multichannel-marketing
    mobile-app-banner
    navigation
    onboarding
    onboarding-tasks
    remote-inbox-notifications
    remote-free-extensions
    payment-gateway-suggestions
    shipping-label-banner
    subscriptions
    store-alerts
    transient-notices
    woo-mobile-welcome
    wc-pay-promotion
    wc-pay-welcome-page Disabled Features: minified-js
    new-product-management-experience
    settings Daily Cron: ? Next scheduled: 2023-02-10 14:35:42 +00:00
    Options: ?
    Notes: 113
    Onboarding: completed Action Scheduler Complete: 104
    Oldest: 2023-01-11 08:54:39 +0000
    Newest: 2023-02-10 11:06:55 +0000 Pending: 1
    Oldest: 2023-02-11 09:54:33 +0000
    Newest: 2023-02-11 09:54:33 +0000 Status report information Generated at: 2023-02-10 11:32:24 +00:00
    `

    Fatal Errors

    2023-02-02T20:05:25+00:00 CRITICAL Uncaught Error: Call to a member function get_cart_contents_count() on null in /var/www/vhosts/westfieldcountrypark.co.uk/httpdocs/wp-content/themes/Avada/includes/avada-functions.php:537
    Stack trace:

    0 /var/www/vhosts/westfieldcountrypark.co.uk/httpdocs/wp-content/themes/Avada/includes/avada-functions.php(696): avada_nav_woo_cart()

    1 /var/www/vhosts/westfieldcountrypark.co.uk/httpdocs/wp/wp-includes/class-wp-hook.php(308): avada_add_woo_cart_to_nav()

    2 /var/www/vhosts/westfieldcountrypark.co.uk/httpdocs/wp/wp-includes/plugin.php(205): WP_Hook->apply_filters()

    3 /var/www/vhosts/westfieldcountrypark.co.uk/httpdocs/wp/wp-includes/nav-menu-template.php(273): apply_filters()

    4 /var/www/vhosts/westfieldcountrypark.co.uk/httpdocs/wp-content/themes/Avada/includes/avada-functions.php(1373): wp_nav_menu()

    5 /var/www/vhosts/westfieldcountrypark.co.uk/httpdocs/wp-content/themes/Avada/templates/header-v3.php(24): avada_main_menu()

    6 /var/www/vhosts/westfieldcountrypark.co.uk/httpdocs/wp/wp-includes/template.php(78 in /var/www/vhosts/westfieldcountrypark.co.uk/httpdocs/wp-content/themes/Avada/includes/avada-functions.php on line 537

Viewing 9 replies - 1 through 9 (of 9 total)
  • The topic ‘Woocommerce URLs Don’t Force Trailing Slash’ is closed to new replies.