Possible bug with recent Variations + Sale Price feature, when saving product - endless loop, out of

We are just setting up a store and only managed to enter variations for a single product. We started with MarketPress v2.4.2.

Now updating the information for this product is broken and from what I'm observing, the recent Sale Price feature might be to blame.

After I click update, plugin saves part of the data normally, i.e. category changes, but also goes into an endless loop saving something else. This something else probably fails, and from what I can see, after a reload of the product page, Variations and Sale Price changes do not get saved.

Turning on debug output doesn't reveal much:

Notice: Undefined index: mp_version in /wp-content/plugins/marketpress/marketpress.php on line 152
Notice: Undefined index: none in /wp-content/plugins/marketpress/marketpress.php on line 440

And then the big bomb:

9930301081081081191191191191191191051051051051051051051121121121121121121121191081081081083030303030119303010810810810810899999999999910510510510510510510511211211211211211211299108108303030303011911911911911911999108303030119119119119119999999999999105105105105105105105112112112112112112112991191193030303011930301081081081081089999999999991051051051051051051051121121121121121121129910810830303030301191191191191191191081083030301191191191191199999999999991051051051051051051051121121121121121121129911911930303030119303010810810810810899999999999910510510510510510510511211211211211211211299108108303030303011911911911911911910810830303011911911911911999999999999910510510510510510510511211211211211211211299119119303030301193030108108108108108999999999999105105105105105105105112112112112112112112991081083030303030119119119119119119108108303030119119119119119999999999999105105105105105105105112112112112112112112991191193030303011930301081081081081089999999999991051051051051051051051121121121121121121129910810830303030301191191191191191191081083030301191191191191199999999999991051051051051051051051121121121121121121129911911930303030119303010810810810810899999999999910510510510510510510511211211211211211211299108108303030303011911911911911911910810830303011911911911911999999999999910510510510510510510511211211211211211211299119119303030301193030108108108108108999999999999105105105105105105105112112112112112112112991081083030303030119119119119119119108108303030119119119119119999999999999105105105105105105105112112112112112112112991191193030303011930301081081081081089999999999991051051051051051051051121121121121121121129910810830303030301191191191191191191081083030301191191191191199999999999991051051051051051051051121121121121121121129911911930303030119303010810810810810899999999999910510510510510510510511211211211211211211299108108303030303011911911911911911910810830303011911911911911999999999999910510510510510510510511211211211211211211299119119303030301193030108108108108108999999999999105105105105105105105112112112112112112112991081083030303030119119119119119119108108303030119119119119119999999999999105105105105105105105112112112112112112112991191193030303011930301081081081081089999999999991051051051051051051051121121121121121121129910810830303030301191191191191191191081083030301191191191191199999999999991051051051051051051051121121121121121121129911911930303030119303010810810810810899999999999910510510510510510510511211211211211211211299108108303030303011911911911911911910810830303011911911911911999999999999910510510510510510510511211211211211211211299119119303030301193030108108108108108999999999999105105105105105105105112112112112112112112991081083030303030119119119119119119108108303030119119119119119999999999999105105105105105105105112112112112112112112991191193030303011930301081081081081089999999999991051051051051051051051121121121121121121129910810830303030301191191191191191191081083030301191191191191199999999999991051051051051051051051121121121121121121129911911930303030119303010810810810810899999999999910510510510510510510511211211211211211211299108108303030303011911911911911911910810830303011911911911911999999999999910510510510510510510511211211211211211211299119119303030301193030108108108108108999999999999105105105105105105105112112112112112112112991081083030303030119119119119119119108108303030119119119119119999999999999105105105105105105105112112112112112112112991191193030303011930301081081081081089999999999991051051051051051051051121121121121121121129910810830303030301191191191191191191081083030301191191191191199999999999991051051051051051051051121121121121121121129911911930303030119303010810810810810899999999999910510510510510510510511211211211211211211299108108303030303011911911911911911910810830303011911911911911999999999999910510510510510510510511211211211211211211299119119303030301193030108108108108108999999999999105105105105105105105112112112112112112112991081083030303030119119119119119119108108303030119119119119119999999999999105105105105105105105112112112112112112112991191193030303011930301081081081081089999999999991051051051051051051051121121121121121121129910810830303030301191191191191191191081083030301191191191191199999999999991051051051051051051051121121121121121121129911911930303030119303010810810810810899999999999910510510510510510510511211211211211211211299108108303030303011911911911911911910810830303011911911911911999999999999910510510510510510510511211211211211211211299119119303030301193030108108108108108999999999999105105105105105105105112112112112112112112991081083030303030119119119119119119108108303030119119119119119999999999999105105105105105105105112112112112112112112991191193030303011930301081081081081089999999999991051051051051051051051121121121121121121129910810830303030301191191191191191191081083030301191191191191199999999999991051051051051051051051121121121121121121129911911930303030119303010810810810810899999999999910510510510510510510511211211211211211211299108108303030303011911911911911911910810830303011911911911911999999999999910510510510510510510511211211211211211211299119119303030301193030108108108108108999999999999105105105105105105105112112112112112112112991081083030303030119119119119119119108108303030119119119119119999999999999105105105105105105105112112112112112112112991191193030303011930301081081081081089999999999991051051051051051051051121121121121121121129910810830303030301191191191191191191081083030301191191191191199999999999991051051051051051051051121121121121121121129911911930303030119303010810810810810899999999999910510510510510510510511211211211211211211299108108303030303011911911911911911910810830303011911911911911999999999999910510510510510510510511211211211211211211299119119303030301193030108108108108108999999999999105105105105105105105112112112112112112112991081083030303030119119119119119119108108303030119119119119119999999999999105105105105105105105112112112112112112112991191193030303011930301081081081081089999999999991051051051051051051051121121121121121121129910810830303030301191191191191191191081083030301191191191191199999999999991051051051051051051051121121121121121121129911911930303030119303010810810810810899999999999910510510510510510510511211211211211211211299108108303030303011911911911911911910810830303011911911911911999999999999910510510510510510510511211211211211211211299119119303030301193030108108108108108999999999999105105105105105105105112112112112112112112991081083030303030119119119119119119108108303030119119119119119999999999999105105105105105105105112112112112112112112991191193030303011930301081081081081089999999999991051051051051051051051121121121121121121129910810830303030301191191191191191191081083030301191191191191199999999999991051051051051051051051121121121121121121129911911930303030119303010810810810810899999999999910510510510510510510511211211211211211211299108108303030303011911911911911911910810830303011911911911911999999999999910510510510510510510511211211211211211211299119119303030301193030108108108108108999999999999105105105105105105105112112112112112112112991081083030303030119119119119119119108108303030119119119119119999999999999105105105105105105105112112112112112112112991191193030303011930301081081081081089999999999991051051051051051051051121121121121121121129910810830303030301191191191191191191081083030301191191191191199999999999991051051051051051051051121121121121121121129911911930303030119303010810810810810899999999999910510510510510510510511211211211211211211299108108303030303011911911911911911910810830303011911911911911999999999999910510510510510510510511211211211211211211299119119303030301193030108108108108108999999999999105105105105105105105112112112112112112112991081083030303030119119119119119119108108303030119119119119119999999999999105105105105105105105112112112112112112112991191193030303011930301081081081081089999999999991051051051051051051051121121121121121121129910810830303030301191191191191191191081083030301191191191191199999999999991051051051051051051051121121121121121121129911911930303030119303010810810810810899999999999910510510510510510510511211211211211211211299108108303030303011911911911911911910810830303011911911911911999999999999910510510510510510510511211211211211211211299119119303030301193030108108108108108999999999999105105105105105105105112112112112112112112991081083030303030119119119119119119108108303030119119119119119999999999999105105105105105105105112112112112112112112991191193030303011930301081081081081089999999999991051051051051051051051121121121121121121129910810830303030301191191191191191191081083030301191191191191199999999999991051051051051051051051121121121121121121129911911930303030119303010810810810810899999999999910510510510510510510511211211211211211211299108108303030303011911911911911911910810830303011911911911911999999999999910510510510510510510511211211211211211211299119119303030301193030108108108108108999999999999105105105105105105105112112112112112112112991081083030303030119119119119119119108108303030119119119119119999999999999105105105105105105105112112112112112112112991191193030303011930301081081081081089999999999991051051051051051051051121121121121121121129910810830303030301191191191191191191081083030301191191191191199999999999991051051051051051051051121121121121121121129911911930303030119303010810810810810899999999999910510510510510510510511211211211211211211299108108303030303011911911911911911910810830303011911911911911999999999999910510510510510510510511211211211211211211299119119303030301193030108108108108108999999999999105105105105105105105112112112112112112112991081083030303030119119119119119119108108303030119119119119119999999999999105105105105105105105112112112112112112112991191193030303011930301081081081081089999999999991051051051051051051051121121121121121121129910810830303030301191191191191191191081083030301191191191191199999999999991051051051051051051051121121121121121121129911911930303030119303010810810810810899999999999910510510510510510510511211211211211211211299108108303030303011911911911911911910810830303011911911911911999999999999910510510510510510510511211211211211211211299119119303030301193030108108108108108999999999999105105105105105105105112112112112112112112991081083030303030119119119119119119108108303030119119119119119999999999999105105105105105105105112112112112112112112991191193030303011930301081081081081089999999999991051051051051051051051121121121121121121129910810830303030301191191191191191191081083030301191191191191199999999999991051051051051051051051121121121121121121129911911930303030119303010810810810810899999999999910510510510510510510511211211211211211211299108108303030303011911911911911911910810830303011911911911911999999999999910510510510510510510511211211211211211211299119119303030301193030108108108108108999999999999105105105105105105105112112112112112112112991081083030303030119119119119119119108108303030119119119119119999999999999105105105105105105105112112112112112112112991191193030303011930301081081081081089999999999991051051051051051051051121121121121121121129910810830303030301191191191191191191081083030301191191191191199999999999991051051051051051051051121121121121121121129911911930303030119303010810810810810899999999999910510510510510510510511211211211211211211299108108303030303011911911911911911910810830303011911911911911999999999999910510510510510510510511211211211211211211299119119303030301193030108108108108108999999999999105105105105105105105112112112112112112112991081083030303030119119119119119119108108303030119119119119119999999999999105105105105105105105112112112112112112112991191193030303011930301081081081081089999999999991051051051051051051051121121121121121121129910810830303030301191191191191191191081083030301191191191191199999999999991051051051051051051051121121121121121121129911911930303030119303010810810810810899999999999910510510510510510510511211211211211211211299108108303030303011911911911911911910810830303011911911911911999999999999910510510510510510510511211211211211211211299119119303030301193030108108108108108999999999999105105105105105105105112112112112112112112991081083030303030119119119119119119108108303030119119119119119999999999999105105105105105105105112112112112112112112991191193030303011930301081081081081089999999999991051051051051051051051121121121121121121129910810830303030301191191191191191191081083030301191191191191199999999999991051051051051051051051121121121121121121129911911930303030119303010810810810810899999999999910510510510510510510511211211211211211211299108108303030303011911911911911911910810830303011911911911911999999999999910510510510510510510511211211211211211211299119119303030301193030108108108108108999999999999105105105105105105105112112112112112112112991081083030303030119119119119119119108108303030119119119119119999999999999105105105105105105105112112112112112112112991191193030303011930301081081081081089999999999991051051051051051051051121121121121121121129910810830303030301191191191191191191081083030301191191191191199999999999991051051051051051051051121121121121121121129911911930303030119303010810810810810899999999999910510510510510510510511211211211211211211299108108303030303011911911911911911910810830303011911911911911999999999999910510510510510510510511211211211211211211299119119303030301193030108108108108108999999999999105105105105105105105112112112112112112112991081083030303030119119119119119119108108303030119119119119119999999999999105105105105105105105112112112112112112112991191193030303011930301081081081081089999999999991051051051051051051051121121121121121121129910810830303030301191191191191191191081083030301191191191191199999999999991051051051051051051051121121121121121121129911911930303030119303010810810810810899999999999910510510510510510510511211211211211211211299108108303030303011911911911911911910810830303011911911911911999999999999910510510510510510510511211211211211211211299119119303030301193030108108108108108999999999999105105105105105105105112112112112112112112991081083030303030119119119119119119108108303030119119119119119999999999999105105105105105105105112112112112112112112991191193030303011930301081081081081089999999999991051051051051051051051121121121121121121129910810830303030301191191191191191191081083030301191191191191199999999999991051051051051051051051121121121121121121129911911930303030119303010810810810810899999999999910510510510510510510511211211211211211211299108108303030303011911911911911911910810830303011911911911911999999999999910510510510510510510511211211211211211211299119119303030301193030108108108108108999999999999105105105105105105105112112112112112112112991081083030303030119119119119119119108108303030119119119119119999999999999105105105105105105105112112112112112112112991191193030303011930301081081081081089999999999991051051051051051051051121121121121121121129910810830303030301191191191191191191081083030301191191191191199999999999991051051051051051051051121121121121121121129911911930303030119303010810810810810899999999999910510510510510510510511211211211211211211299108108303030303011911911911911911910810830303011911911911911999999999999910510510510510510510511211211211211211211299119119303030301193030108108108108108999999999999105105105105105105105112112112112112112112991081083030303030119119119119119119108108303030119119119119119999999999999105105105105105105105112112112112112112112991191193030303011930301081081081081089999999999991051051051051051051051121121121121121121129910810830303030301191191191191191191081083030301191191191191199999999999991051051051051051051051121121121121121121129911911930303030119303010810810810810899999999999910510510510510510510511211211211211211211299108108303030303011911911911911911910810830303011911911911911999999999999910510510510510510510511211211211211211211299119119303030301193030108108108108108999999999999105105105105105105105112112112112112112112991081083030303030119119119119119119108108303030119119119119119999999999999105105105105105105105112112112112112112112991191193030303011930301081081081081089999999999991051051051051051051051121121121121121121129910810830303030301191191191191191191081083030301191191191191199999999999991051051051051051051051121121121121121121129911911930303030119303010810810810810899999999999910510510510510510510511211211211211211211299108108303030303011911911911911911910810830303011911911911911999999999999910510510510510510510511211211211211211211299119119303030301193030108108108108108999999999999105105105105105105105112112112112112112112991081083030303030119119119119119119108108303030119119119119119999999999999105105105105105105105112112112112112112112991191193030303011930301081081081081089999999999991051051051051051051051121121121121121121129910810830303030301191191191191191191081083030301191191191191199999999999991051051051051051051051121121121121121121129911911930303030119303010810810810810899999999999910510510510510510510511211211211211211211299108108303030303011911911911911911910810830303011911911911911999999999999910510510510510510510511211211211211211211299119119303030301193030108108108108108999999999999105105105105105105105112112112112112112112991081083030303030119119119119119119108108303030119119119119119999999999999105105105105105105105112112112112112112112991191193030303011930301081081081081089999999999991051051051051051051051121121121121121121129910810830303030301191191191191191191081083030301191191191191199999999999991051051051051051051051121121121121121121129911911930303030119303010810810810810899999999999910510510510510510510511211211211211211211299108108303030303011911911911911911910810830303011911911911911999999999999910510510510510510510511211211211211211211299119119303030301193030108108108108108999999999999105105105105105105105112112112112112112112991081083030303030119119119119119119108108303030119119119119119999999999999105105105105105105105112112112112112112112991191193030303011930301081081081081089999999999991051051051051051051051121121121121121121129910810830303030301191191191191191191081083030301191191191191199999999999991051051051051051051051121121121121121121129911911930303030119303010810810810810899999999999910510510510510510510511211211211211211211299108108303030303011911911911911911910810830303011911911911911999999999999910510510510510510510511211211211211211211299119119303030301193030108108108108108999999999999105105105105105105105112112112112112112112991081083030303030119119119119119119108108303030119119119119119999999999999105105105105105105105112112112112112112112991191193030303011930301081081081081089999999999991051051051051051051051121121121121121121129910810830303030301191191191191191191081083030301191191191191199999999999991051051051051051051051121121121121121121129911911930303030119303010810810810810899999999999910510510510510510510511211211211211211211299108108303030303011911911911911911910810830303011911911911911999999999999910510510510510510510511211211211211211211299119119303030301193030108108108108108999999999999105105105105105105105112112112112112112112991081083030303030119119119119119119108108303030119119119119119999999999999105105105105105105105112112112112112112112991191193030303011930301081081081081089999999999991051051051051051051051121121121121121121129910810830303030301191191191191191191081083030301191191191191199999999999991051051051051051051051121121121121121121129911911930303030119303010810810810810899999999999910510510510510510510511211211211211211211299108108303030303011911911911911911910810830303011911911911911999999999999910510510510510510510511211211211211211211299119119303030301193030108108108108108999999999999105105105105105105105112112112112112112112991081083030303030119119119119119119108108303030119119119119119999999999999105105105105105105105112112112112112112112991191193030303011930301081081081081089999999999991051051051051051051051121121121121121121129910810830303030301191191191191191191081083030301191191191191199999999999991051051051051051051051121121121121121121129911911930303030119303010810810810810899999999999910510510510510510510511211211211211211211299108108303030303011911911911911911910810830303011911911911911999999999999910510510510510510510511211211211211211211299119119303030301193030108108108108108999999999999105105105105105105105112112112112112112112991081083030303030119119119119119119108108303030119119119119119999999999999105105105105105105105112112112112112112112991191193030303011930301081081081081089999999999991051051051051051051051121121121121121121129910810830303030301191191191191191191081083030301191191191191199999999999991051051051051051051051121121121121121121129911911930303030119303010810810810810899999999999910510510510510510510511211211211211211211299108108303030303011911911911911911910810830303011911911911911999999999999910510510510510510510511211211211211211211299119119303030301193030108108108108108999999999999105105105105105105105112112112112112112112991081083030303030119119119119119119108108303030119119119119119999999999999105105105105105105105112112112112112112112991191193030303011930301081081081081089999999999991051051051051051051051121121121121121121129910810830303030301191191191191191191081083030301191191191191199999999999991051051051051051051051121121121121121121129911911930303030119303010810810810810899999999999910510510510510510510511211211211211211211299108108303030303011911911911911911910810830303011911911911911999999999999910510510510510510510511211211211211211211299119119303030301193030108108108108108999999999999105105105105105105105112112112112112112112991081083030303030119119119119119119108108303030119119119119119999999999999105105105105105105105112112112112112112112991191193030303011930301081081081081089999999999991051051051051051051051121121121121121121129910810830303030301191191191191191191081083030301191191191191199999999999991051051051051051051051121121121121121121129911911930303030119303010810810810810899999999999910510510510510510510511211211211211211211299108108303030303011911911911911911910810830303011911911911911999999999999910510510510510510510511211211211211211211299119119303030301193030108108108108108999999999999105105105105105105105112112112112112112112991081083030303030119119119119119119108108303030119119119119119999999999999105105105105105105105112112112112112112112991191193030303011930301081081081081089999999999991051051051051051051051121121121121121121129910810830303030301191191191191191191081083030301191191191191199999999999991051051051051051051051121121121121121121129911911930303030119303010810810810810899999999999910510510510510510510511211211211211211211299108108303030303011911911911911911910810830303011911911911911999999999999910510510510510510510511211211211211211211299119119303030301193030108108108108108999999999999105105105105105105105112112112112112112112991081083030303030119119119119119119108108303030119119119119119999999999999105105105105105105105112112112112112112112991191193030303011930301081081081081089999999999991051051051051051051051121121121121121121129910810830303030301191191191191191191081083030301191191191191199999999999991051051051051051051051121121121121121121129911911930303030119303010810810810810899999999999910510510510510510510511211211211211211211299108108303030303011911911911911911910810830303011911911911911999999999999910510510510510510510511211211211211211211299119119303030301193030108108108108108999999999999105105105105105105105112112112112112112112991081083030303030119119119119119119108108303030119119119119119999999999999105105105105105105105112112112112112112112991191193030303011930301081081081081089999999999991051051051051051051051121121121121121121129910810830303030301191191191191191191081083030301191191191191199999999999991051051051051051051051121121121121121121129911911930303030119303010810810810810899999999999910510510510510510510511211211211211211211299108108303030303011911911911911911910810830303011911911911911999999999999910510510510510510510511211211211211211211299119119303030301193030108108108108108999999999999105105105105105105105112112112112112112112991081083030303030119119119119119119108108303030119119119119119999999999999105105105105105105105112112112112112112112991191193030303011930301081081081081089999999999991051051051051051051051121121121121121121129910810830303030301191191191191191191081083030301191191191191199999999999991051051051051051051051121121121121121121129911911930303030119303010810810810810899999999999910510510510510510510511211211211211211211299108108303030303011911911911911911910810830303011911911911911999999999999910510510510510510510511211211211211211211299119119303030301193030108108108108108999999999999105105105105105105105112112112112112112112991081083030303030119119119119119119108108303030119119119119119999999999999105105105105105105105112112112112112112112991191193030303011930301081081081081089999999999991051051051051051051051121121121121121121129910810830303030301191191191191191191081083030301191191191191199999999999991051051051051051051051121121121121121121129911911930303030119303010810810810810899999999999910510510510510510510511211211211211211211299108108303030303011911911911911911910810830303011911911911911999999999999910510510510510510510511211211211211211211299119119303030301193030108108108108108999999999999105105105105105105105112112112112112112112991081083030303030119119119119119119108108303030119119119119119999999999999105105105105105105105112112112112112112112991191193030303011930301081081081081089999999999991051051051051051051051121121121121121121129910810830303030301191191191191191191081083030301191191191191199999999999991051051051051051051051121121121121121121129911911930303030119303010810810810810899999999999910510510510510510510511211211211211211211299108108303030303011911911911911911910810830303011911911911911999999999999910510510510510510510511211211211211211211299119119303030301193030108108108108108999999999999105105105105105105105112112112112112112112991081083030303030119119119119119119108108303030119119119119119999999999999105105105105105105105112112112112112112112991191193030303011930301081081081081089999999999991051051051051051051051121121121121121121129910810830303030301191191191191191191081083030301191191191191199999999999991051051051051051051051121121121121121121129911911930303030119303010810810810810899999999999910510510510510510510511211211211211211211299108108303030303011911911911911911910810830303011911911911911999999999999910510510510510510510511211211211211211211299119119303030301193030108108108108108999999999999105105105105105105105112112112112112112112991081083030303030119119119119119119108108303030119119119119119999999999999105105105105105105105112112112
Fatal error: Allowed memory size of 268435456 bytes exhausted (tried to allocate 262144 bytes) in /wp-includes/wp-db.php on line 1095

I am not sure what that (hex?) code is that is actually being spit out, but it definitely goes with the endless loop story as its full of repeating patterns.

When I Update a product that has no Variations, this request succeeds just fine.

There also does not seem to be a problem when you enter new Variation data for an existing product. So this leads me to think it might be a data structures upgrade problem.

  • Arun Basil Lal

    Hello lkraav,

    Let me test these things out on a test installation. Is there anything that I should know before I do that?

    Thanks for bringing this up, since it happens only when creating variations of the same product (which many users may not be using at the moment), it could be a real bug. Am gonna try this anyway, if you have anything that i should know, just let me know.

    I will get back to you.

    Arun Basil Lal

  • Aaron

    I'm pretty sure this is not MarketPress core. I see you mentioned WPML which hooks heavily into MarketPress, so that's a likely source of the problem. With that bridge plugin off does it fix the problem?

    If so you'll need to contact WPML support as we have no control over that. Also make sure you have the latest version of their bridge, as I believe they've just released an update for MP 2.5+ compatibility.

  • lkraav

    For the record, I'm following this thing here as well: http://wpml.org/forums/topic/wpml-marketpress-endless-loop-bug-on-translated-product-save/

    Tonight I made some progress in tracking this down. http://wpml.org/documentation/support/debugging-wpml/ pointed out some extra ini_set settings, that finally gave me some relevant output. This is where we bomb:

    [25-Mar-2012 21:07:00] PHP Fatal error: Maximum function nesting level of '100' reached, aborting! in /home/markitek/public_html/palmatin/wp-content/plugins/sitepress-multilingual-cms/sitepress
    .class.php on line 6023

  • lkraav

    Put error_log( $sql ) on line 6023. Last two queries before infinite recursion:

    ...
    [25-Mar-2012 21:58:28] SELECT meta_id FROM wp_postmeta WHERE meta_key = 'mp_sales_count' AND post_id = 1628
    [25-Mar-2012 21:58:28] UPDATE wp_postmeta SET meta_value = 's:749:\"a:1:{i:0;s:730:\"s:721:\"a:1:{i:0;s:702:\"s:693:\"a:1:{i:0;s:674:\"s:665:\"a:1:{i:0;s:646:\"s:637:\"a:1:{i:0;s:618:\"a:1:{i:0;s:599:\"s:590:\"a:1:{i:0;s:571:\"s:562:\"a:1:{i:0;s:543:\"s:534:\"a:1:{i:0;s:515:\"s:506:\"a:1:{i:0;s:487:\"s:478:\"a:1:{i:0;s:459:\"s:450:\"a:1:{i:0;s:431:\"s:422:\"a:1:{i:0;s:403:\"s:394:\"a:1:{i:0;s:375:\"s:366:\"a:1:{i:0;s:347:\"s:338:\"a:1:{i:0;s:319:\"s:310:\"a:1:{i:0;s:291:\"s:282:\"s:273:\"a:1:{i:0;s:254:\"s:245:\"s:236:\"a:1:{i:0;s:217:\"a:1:{i:0;s:198:\"a:1:{i:0;s:179:\"a:1:{i:0;s:160:\"a:1:{i:0;s:141:\"s:132:\"s:123:\"a:1:{i:0;s:104:\"s:96:\"a:1:{i:0;s:78:\"s:70:\"a:1:{i:0;s:52:\"s:44:\"a:1:{i:0;s:26:\"s:18:\"a:1:{i:0;s:1:\"0\";}\";\";}\";\";}\";\";}\";\";}\";\";\";}\";}\";}\";}\";}\";\";\";}\";\";\";}\";\";}\";\";}\";\";}\";\";}\";\";}\";\";}\";\";}\";\";}\";\";}\";\";}\";\";}\";}\";\";}\";\";}\";\";}\";\";}\";' WHERE post_id = 1628 AND meta_key = 'mp_sales_count'
    [25-Mar-2012 21:58:28] SELECT meta_id FROM wp_postmeta WHERE meta_key = 'mp_sales_count' AND post_id = 30
    [25-Mar-2012 21:58:28] UPDATE wp_postmeta SET meta_value = 's:749:\"a:1:{i:0;s:730:\"s:721:\"a:1:{i:0;s:702:\"s:693:\"a:1:{i:0;s:674:\"s:665:\"a:1:{i:0;s:646:\"s:637:\"a:1:{i:0;s:618:\"a:1:{i:0;s:599:\"s:590:\"a:1:{i:0;s:571:\"s:562:\"a:1:{i:0;s:543:\"s:534:\"a:1:{i:0;s:515:\"s:506:\"a:1:{i:0;s:487:\"s:478:\"a:1:{i:0;s:459:\"s:450:\"a:1:{i:0;s:431:\"s:422:\"a:1:{i:0;s:403:\"s:394:\"a:1:{i:0;s:375:\"s:366:\"a:1:{i:0;s:347:\"s:338:\"a:1:{i:0;s:319:\"s:310:\"a:1:{i:0;s:291:\"s:282:\"s:273:\"a:1:{i:0;s:254:\"s:245:\"s:236:\"a:1:{i:0;s:217:\"a:1:{i:0;s:198:\"a:1:{i:0;s:179:\"a:1:{i:0;s:160:\"a:1:{i:0;s:141:\"s:132:\"s:123:\"a:1:{i:0;s:104:\"s:96:\"a:1:{i:0;s:78:\"s:70:\"a:1:{i:0;s:52:\"s:44:\"a:1:{i:0;s:26:\"s:18:\"a:1:{i:0;s:1:\"0\";}\";\";}\";\";}\";\";}\";\";}\";\";\";}\";}\";}\";}\";}\";\";\";}\";\";\";}\";\";}\";\";}\";\";}\";\";}\";\";}\";\";}\";\";}\";\";}\";\";}\";\";}\";\";}\";}\";\";}\";\";}\";\";}\";\";}\";' WHERE post_id = 30 AND meta_key = 'mp_sales_count'
    [25-Mar-2012 21:58:28] PHP Fatal error:  Maximum function nesting level of '200' reached, aborting! in /home/markitek/public_html/palmatin/wp-content/plugins/sitepress-multilingual-cms/sitepress.class.php on line 6023

    Discovered another pattern about the bomb string, which is currently:
    1628303030303030301628303030303030301628162816281628162816281628162830303030303030......

    Turns out this is actually an apparently endless string of post_id's from the last two visible queries. Take a look, 1628 and 30.
    ID 30 = original product in english
    ID 1628 = translated product

  • lkraav

    Culprit is found. It is this badly coded function in wpml-marketpress.php. As we can see, it echo's post_id's for probably leftover debugging purposes and then we enter an endless update_post_meta loop between the original and the translated post:

    187 /**
    188  * Synchronizes post meta 'mp_sales_count' betweeen translated posts.
    189  *
    190  * This is used by MarketPress to e.g. get most popular products.
    191  *
    192  * @global type $sitepress
    193  * @param type $meta_id
    194  * @param type $object_id
    195  * @param type $meta_key
    196  * @param type $_meta_value
    197  */
    198 function wpml_marketpress_updated_post_meta_hook($meta_id, $object_id,
    199         $meta_key, $_meta_value) {
    200     if ($meta_key == 'mp_sales_count') {
    201         global $sitepress;
    202         $languages = $sitepress->get_active_languages();
    203         foreach ($languages as $code => $language) {
    204             $product_id = icl_object_id($object_id, 'product', true, $code);
    205             echo $object_id;
    206             update_post_meta($product_id, 'mp_sales_count', $_meta_value);
    207         }
    208     }
    209 }

    Disabling add_action for this function altogether in wpml-marketpress.php enables translated post update to succeed.

    I'm guessing problem with the function is that get_active_languages() also returns the original post's language, which causes the endless loop.

    Adding:

    204 if ( $code == $sitepress->get_current_language() ) continue;

    allows the POST to succeed, probably correctly. Waiting for confirmation from developer.

Thank NAME, for their help.

Let NAME know exactly why they deserved these points.

Gift a custom amount of points.