Forum Replies Created

Viewing 8 replies - 1 through 8 (of 8 total)
  • davedi — new to Woo and long absent from WordPress programmer here. I’m diving back into both by trying to answer other people’s support questions. Given my lack of recent hands on experience I’m not sure if I’ll be able to give you a total answer, but I hope I’ll be able to help.

    The problem here appears to be how the export’s been implemented. When you click the Export button, WooCommerce doesn’t do all the work in a single request. Instead, your browser’s making several ajax requests over and over again, each one doing part of the export. When the export’s complete, WordPress hands you the finished file. This sort of thing is typical in web applications, and is usually done to avoid timeouts in large order exports.

    So, (from one point of view) the problem here is your load balancer is setup to send users along to **any** of your front-end servers. So, those multiple ajax requests each do part of the export on an individual server. This is a common problem when scaling out a web application that was designed for use on a single server to multiple servers.

    One solution to try is configuring your load balancer to use something like Sticky Sessions. This is a common feature in modern load balancers, and helps ensure a user is sent to the same frontend web server every-time.

    Another solution that’s common is to configure your AWS architecture such that every request to wp-admin is served by a single, dedicated box. The idea here is that admin traffic is usually light enough to be handled by a single web server.

    Hope that helps!

    Hi there Kelderkold — I’m not an official support person, only just getting back into WordPress, and lean a little on the technical side, so I’m not sure how helpful I’ll be able to be. However, when you say

    > when trying to make a new site i got this error “HTTP ERROR 500”

    It’s not 100% clear what “trying to make a new site” means. Could you describe the steps you take in your WordPress when you’re trying to do that? With a clearer description more people might be able to help you.

    Regarding your error: “HTTP ERROR 500” this usually means a PHP or web-server error has happened, and happened too early for WordPress to catch it and display something useful. This may be because something went wrong with you upgrade, or it may be the upgrade conflicts with some other extension. A good web host should be able to point you towards your web server/PHP error logs. These logs may have a more verbose description of the problem. With that more verbose description, other people may be able to help you.

    Sorry I don’t have any concrete answers, but I hope that information is helpful in tracking your problem down!

    osvaldolopesff — can you explain a little more what you mean when you say “but it does not working”? Do you see errors? Does the shipping method not show up? Does it show up but you can’t select it? Does it charge you shipping when you expected it not to?

    Also, you said you “configured free shipping in zone” — could you outline exactly what you did?

    With the above clarifications there’s a better chance somewhere here will be able to help you.

    realbrowngirls — it sounds like there might have been a bug in the version of WooCommerce you were using that was fixed in the latest update. i.e. other people had a problem similar to yours and the core team fixed it. Re: distorted — do you mean the images look like they’re the wrong size? Or something else?

    Re: query monitor — if you install that plugin, and are logged into your WordPress site as an admin, you should see some extra text in your admin bar (next to the +New button) that looks something like this 0.51S 35.30MB 0.0123S 33Q. Click on that cryptic text and you should get a menu like this

    – Queries
    – Queries by Caller
    – Queries by Component
    – Request
    – Rewrite Rules
    – Template: index.php
    – Scripts & Styles
    – Hooks
    – Languages
    – HTTP Requests (1)
    – Transients Set (1)
    – Environment
    – is_front_page()
    – is_home()

    Click on the “Queries” option and you’ll jump to the bottom of your page, where you’ll see **all** the SQL queries used to build your page request. There will be a large number of these, some will seem redundant. This is what WordPress’s core code is doing behind the scenes to do **everything** on your site. It can be a little overwhelming, and even seasoned technical WordPress veterans may not known (off the top of their head) what everything is for.

    Our next steps here would have been finding the query that looks like this

    `SELECT SQL_CALC_FOUND_ROWS wp_posts.ID
    FROM wp_posts
    WHERE 1=1

    LIMIT 0, 10`

    next to the WP_Query->get_posts() “Caller”, and then we’d be able to examine what additional WHERE clauses were restricting your query to a single product, and that might have pointed out where our problem was.

    Finally, when you say

    Question: I made a backup of the entire database. If I wanted to find the the wp-includes/query.php portion of the code, where do I look for the original (developer tools on the actual page?)?

    How did you “backup the entire database?” You would have needed to backup your entire database **and** the individual files that make up WordPress and its plugins. When you updated the WooCommerce plugin, it updates files in wp-content/plugins/woocommerce. Without getting too deeply into it, these files change the behavior of the code in wp-includes/query.php to make query.php fetch your products. Whatever bug caused your problem was fixed when you updated these files. Since those files are now updated, you won’t be able to reproduce the bug. (if this sounds maddening, it is, and it’s the sort of thing the people who make WordPress and software like it get to deal with every day)

    It sounds like you’re one your way — I hope I was more helpful than confusing! Best wishes!

    Hey there realbrowngirls — I’ve been doing some semi-related digging into WordPress today and discovered the Query Monitor plugin. If you can install this, it will let you view which SQL queries your page page without the need to edit the file I mentioned above. If you can install that I can guide you through how to find the query that’s fetching your products, and we can maybe figure out what’s going on with your system.

    Hey edwinyzh, that error’s happening because the version of PHP installed on your Ubuntu 16.04 server doesn’t have the curl extension.

    Did you install PHP yourself on the server? If so, how’d you do it? If you can provide that information someone (maybe even me!) might be able to give you additional instructions on how to update your version of PHP with curl.

    The curl extension is what PHP (and therefore WordPress, and therefore WooCommerce) uses to communicate with some third party payment Gateways (and other, HTTP(S) based web services). A lot of WooCommerce will work without it, but when it comes time to accept payments you may run into trouble.

    Got it realbrowngirls, that makes sense. I poked around at my local install and wasn’t able to reproduce your problem. This means the problem isn’t with WooCommerce itself, but some customization, plugin, or WooCommerce bug specific to your data. Have you changed any core WordPress files? Added any theme templates?

    If I was debugging this in front of your computer/server, I’d start by disabling any/all third party plugins. This can often make the problem go away. Once that problem goes away — reenable the plugins one by one until the problem reappears. This will let you know which plugin is causing the problem.

    If this is not a plugin problem (i.e. disabling every plugin doesn’t help) then the next thing I’d do is some advanced SQL debugging. This will involve some temporary editing of a core WordPress file. If you’re not comfortable with things like this you don’t need to try it. That said — although it’s technical, it’s one way to really get at the bottom of what your WordPress system is up to.

    First, make a backup copy of the file

    wp-includes/query.php

    Once you’ve done that, look for the section of query.php (the original, not your backup, around line 3785) that looks like this

    if ( $q['update_post_term_cache'] ) {
    			wp_queue_posts_for_term_meta_lazyload( $this->posts );
    		}
    
    		return $this->posts;

    Add the following echo line right above the return

    echo $this->request;
    return $this->posts;

    and reload your /shop/ page. You should see the SQL query that fetches the products at the top of your page. This query is what Woo uses to lookup your products. For some reason, in your system, this returns only a single product on the main listing page. If you could copy/paste this query for the main listing page (with one product) and a specific listing page (that shows all products) it may illuminate what’s wrong with your system.

    Hope that helps, and apologies if I went off the technical deep end — that’s sort of my jam ?? Best wishes, and good luck!

    Hi there realbrowngirls — that sounds super frustrating. I’m not an official support person, I’m just someone trying to learn WooCommerce by helping other folks with their problems. I saw the behavior you described (only one of your products shows up), but I’m a little unclear on a few things you said. If you could clarify them, that might help me (or someone else) solve your problem.

    When you say “I did the custom sorting” — what do you mean by this? Did you follow a tutorial somewhere? Installing a plugin? If so, which tutorial or plugin?

    Also, when you say In settings for woocommerce I have “custom sorting” selected — which WordPress navigation did you click on to get there?

    With that information someone might be able to better understand your problem and help out.

    Cheers!

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