Forum
Suddenly unable to save updates within (Paypal?) shop
Hello,
Re: www.emilyshomestead.com / Perch admin account is "rootcellar".
Within Perch admin > Shop > Shop + > Listing Products
When a change is made to product, clicking Save gets the following error message:
Fatal error: Call to a member function return_instance() on a non-object in /home1/gralpher/public_html/rootcellar/core/lib/api/PerchAPI_Form.class.php on line 423
Started suddenly a month or so ago according to client.
I've included the Diagnostic Report and template (hoping it's the right one) below.
Thanks for any help you can offer!
Diagnostic Report
<?php
include(__DIR__ . '/../../inc/pre_config.php');
include(__DIR__ . '/../../../config/config.php');
include(PERCH_CORE . '/inc/loader.php');
$Perch = PerchAdmin::fetch();
include(PERCH_CORE . '/inc/auth.php');
if (!$CurrentUser->has_priv('perch.settings')) {
PerchUtil::redirect(PERCH_LOGINPATH);
}
$Perch->page_title = PerchLang::get('Settings');
$Alert = new PerchAlert;
if (isset($_GET['extended'])) {
include(__DIR__ . '/../modes/diagnostics.extended.pre.php');
}else{
include(__DIR__ . '/../modes/diagnostics.pre.php');
}
include(__DIR__ . '/../modes/diagnostics.pre.php');
include(PERCH_CORE . '/inc/top.php');
if (isset($_GET['extended'])) {
include(__DIR__ . '/../modes/diagnostics.extended.post.php');
}else{
include(__DIR__ . '/../modes/diagnostics.post.php');
}
include(PERCH_CORE . '/inc/btm.php');
?>
Template
<header>
<h2><perch:shop id="productTitle" /></h2>
</header>
<div id="single-product-column-wrapper" class="row">
<div id="" class="single-product-left-column">
<h3 id="single-product-subhead"><perch:shop id="leadIn" type="textarea" label="Lead In:" /></h3>
<p><perch:shop id="productDescHTML" encode="false" /></p>
<div id="ingredients">
<p><span>Product Description:</span> <perch:shop id="seconDetails" type="textarea" label="Secondary details:" /></p>
<p><span>Ingredients:</span> <perch:shop id="ingredients" type="textarea" label="Ingredients" /></p>
<perch:if exists="particulars"><p><span>Particulars:</span> <perch:shop id="particulars" type="textarea" label="Particulars" /></p></perch:if>
</div>
</div>
<div class="single-product-right-column">
<div id="single-product-photo" class="product-photo"><div class="sale-flag <perch:shop label="Is the item currently on sale?" id="saleCondition" type="radio" options="Yes|onSale,No|noSale" wrap="div.radiowrapper" order="20"/>">on sale</div><perch:if exists="productImage">
<img src="<perch:shop id="productImage" label="Image" type="image" width="350" height="350" crop="true" required="true" />" alt="<perch:shop id="productTitle" />" />
</perch:if></div>
<h6 id="single-product-reg-price" >$<perch:shop id="productPrice" /></h6>
<span class="<perch:shop id="saleCondition" />">
<h6 id="sale-price">- $<perch:shop id="discountAmount" label="Discount amount (include decimals): " order="21" />*</h6></span>
<a id="pinterest-icon" href="//www.pinterest.com/pin/create/button/?url=http%3A%2F%2Fwww.emilyshomestead.com%2Fproduct.html&media=http%3A%2F%2Fwww.emilyshomestead.com%2Fm%2Fcontent%2Fspiced-pumpkin-soap.jpg&description=Next%20stop%3A%20Pinterest" data-pin-do="buttonPin" data-pin-config="top" data-pin-color="red" data-pin-height="28"><img src="//assets.pinterest.com/images/pidgets/pinit_fg_en_rect_red_28.png" /></a>
<div id="single-product-button">
<perch:form id="_xclick" method="post" action="https://www.paypal.com/cgi-bin/webscr">
<perch:input type="hidden" name="business" value="<perch:setting id="perch_shop_paypal_email" />" />
<perch:input type="hidden" name="currency_code" value="USD" />
<perch:input type="hidden" name="cmd" value="_cart" />
<perch:input type="hidden" name="add" value="1" />
<perch:input type="hidden" name="item_name" value="<perch:shop id="productTitle" order="1"/>" />
<perch:input type="hidden" name="item_number" value="<perch:shop id="productCode" order="2"/>" />
<perch:input type="hidden" name="amount" value="<perch:shop id="productPrice" order="3"/>" />
<perch:input type="hidden" name="productCount" value="<perch:shop id="productCount" order="4"/>" />
<perch:input type="hidden" name="return" value="https://www.emilyshomestead.com/success.html" />
<perch:input type="hidden" name="cancel_return" value="https://www.emilyshomestead.com/error.html" />
<perch:input type="hidden" name="weight" value="<perch:shop type="hidden" label="Item Type:" id="productWeight" type="radio" options="Soap/Shampoo|.31,Sm. Deodorant|.13,Lg. Deodorant|.27,Lb of Laundry Soap|1,Lotion Tube|.13,Lip Balm|.03" wrap="div.radiowrapper" />" />
<perch:input type="hidden" name="discount_amount" value="<perch:shop id="discountAmount" format="$:%.2n" type="text" label="Amount of Discount (In USD)" order="6" />" />
<perch:if exists="productOptions_html"><perch:shop id="productOptions_html" encode="false" type="hidden" /></perch:if>
<h7><perch:input type="submit" name="add" value="Add to cart" /></h7>
</perch:form>
</div>
<p id="availability-icon"><img src="m/content/checkmark-icon.png"> <perch:shop id="productCount" /> In Stock.</p>
<div class="<perch:shop id="saleCondition" />"><p id="sale-price-adjunct-single-product">*DISCOUNT APPLIED IN CART</p></div>
</div>
</div>
Hi Michael
we need the actual Diagnostics Report from under Settings in the Perch Control Panel as that gives us information about your setup. Not the code of the Diagnostics Report (we already know what that looks like :) )
Rachel
Rachel,
Sorry. Here is the correct diagnostics report. Thanks!
Rachel,
Just in case, here is the extended diagnostic report:
When you say suddenly - what changed?
As far as I can tell, nothing.
The client has been using the payal shop app to manage her products. Up until recently it has been working fine. As of a month or so ago she began getting the fatal error when she tried to save any changes. So she can't update the product descriptions, prices, etc. any more.
As I always do, I upgraded her to the latest version of Perch - perch_v2.8.18 - at the end of November. Simply replaced the core folder with the newest one. Upgrading hasn't been a problem before.
The first thing I did when I heard of the problem was downgrade to the previous version of Perch to see if that eliminated the problem, since it was working previously, but I got the same fatal error.
Same results with the very latest version of Perch.
Could the client have done something in the normal client use of Perch to break the process?
I'll see what I can find out!
Hi Drew,
Is there anything else I can provide that would be helpful?
Drew,
This is now resolved.
I found a post on this forum where someone was getting the exact same fatal error message, only by way of their blog add-on app. Just needed to have the blog updated. Doh!
So I simply updated the shop_paypal app and that fixed the problem. Now I know to keep the apps updated along with Perch itself. Cheers.