Foxy Forum Status

We're no longer responding to questions via our forum, but we will keep it up for historical reasons. If you can't find the answer you're looking for, please visit our knowledge base or contact us. If there's enough interest in the future, we may bring the forum back.

Inconsistent template api behavior

I use and have for a while now on 1.x some code to auto cache my templates. I am not sure when the issue arose but now on 2.0 I def see it as I am making lots of template changes. My API upload results always ends with:

<?xml version='1.0' encoding='UTF-8'?><foxydata><store_version>2.0</store_version><result>SUCCESS</result><messages><message>cart Template Updated</message></messages></foxydata>
<?xml version='1.0' encoding='UTF-8'?><foxydata><store_version>2.0</store_version><result>SUCCESS</result><messages><message>checkout Template Updated</message></messages></foxydata>
<?xml version='1.0' encoding='UTF-8'?><foxydata><store_version>2.0</store_version><result>SUCCESS</result><messages><message>receipt Template Updated</message></messages></foxydata>

which appears to indicate success but in about 30-50% of the cases the upload does not take place and I have to manually either:
1. Change the url to fetch my remote template (in case the url changes - some of the templates will change it others will not)
2. Paste the code in myself from the same url that you have listed. I go paste it in browser, view source and paste that

There seems to be some code that checks perhaps for a change in the template and that code my have an issue detecting all changes? Ideas as to what it could be?

For example I just decided to add this code:

<base href="/" />

to all my templates. I ran my task, got the above xml success but not a single one of the templates had the base tag added. Even clicking the green button did not do it (url was correct). So I had to paste it.
  • fc_jedfc_jed FoxyCart Team

    Once again, good catch. I've filed a ticket for this bug and you will be notified once a fix rolls out. I must say that you are on quite a roll here. Ever considered finding bugs for Bugcrowd?
  • This is still an issue. Usually the checkout page. its not possible to load it using the API. Cart and receipt work fine. Still shows the same success message but I have to go in admin and do it manually.
  • fc_adamfc_adam FoxyCart Team

    I'm very sorry for the delay on our side. Looking at the ticket Jed created, there was some initial discussion on this issue but it looks like it may have fallen off the radar. I've pinged the thread again to get it back in front of the relevant team members.

    As an aside - you mentioned that you're mainly seeing it with the checkout. Is your checkout template significantly different in size or scope to the cart and/or receipt templates?
  • No the template is not that big - my receipt is actually the really large one. But while I can't remember if originally the issue was with checkout I can say that the last couple of days when I worked on it it was the checkout on every try. I looked to see if perhaps I had something wrong on my end but I dont see anything and FC gives me a nice xml message saying its cool even when its not.
  • Just did another update - this time checkout took but not cart.
  • fc_adamfc_adam FoxyCart Team

    Sorry - I thought we'd confirmed this before now, but could you please confirm which store you're experiencing this with?
  • happycloudhappycloud Member
    edited April 2016
    On April 26th was the last try
  • fc_adamfc_adam FoxyCart Team
    @happycloud - thanks for whispering that information.
  • fc_adamfc_adam FoxyCart Team

    One of our developers tried to replicate this and is having a hard time doing so. Would it be possible for you to go into a bit more detail about how you're triggering the API cache requests to happen on your side? Are you triggering all three requests simultaneously or individually one after the other? Are you including a template URL to cache, or leaving it blank to use the existing URL set in the admin?

    Also - when you know that the cache didn't happen correctly even though the API responded positively - how are you telling that? Is the template blank, or is it just missing the changes you've applied?
Sign In or Register to comment.