{"id":503,"date":"2022-08-30T15:02:26","date_gmt":"2022-08-30T15:02:26","guid":{"rendered":"https:\/\/unknownerror.org\/index.php\/2013\/11\/09\/live-server-and-test-server-sharing-exact-same-codebase-but-live-server-works-and-test-server-fails-collection-of-common-programming-errors\/"},"modified":"2022-08-30T15:02:26","modified_gmt":"2022-08-30T15:02:26","slug":"live-server-and-test-server-sharing-exact-same-codebase-but-live-server-works-and-test-server-fails-collection-of-common-programming-errors","status":"publish","type":"post","link":"https:\/\/unknownerror.org\/index.php\/2022\/08\/30\/live-server-and-test-server-sharing-exact-same-codebase-but-live-server-works-and-test-server-fails-collection-of-common-programming-errors\/","title":{"rendered":"Live server and test server sharing exact same codebase, but live server works and test server fails-Collection of common programming errors"},"content":{"rendered":"<p>Since I posted this question, this issue has resolved itself. There must have been a glitch on Facebook or my dev server. Anyway, thanks to those of you who tried to help.<\/p>\n<p>I have a Facebook app that runs on two servers: a live server and a dev server.<\/p>\n<p>I was making some changes on dev and testing them when FBJS failed with an error (undefined functions)<\/p>\n<p>I continuously reverted my changes to the dev server but could not get it working. So I reverted to the same revision that works on my live server, but it still fails on the dev server.<\/p>\n<p>The source of the error appears to be a single JS file. I have verified in every way possible that this is the exact same file I am using on the live server where it works, but it is failing on the dev server with &#8220;undefined functions&#8221;.<\/p>\n<p>I am at my wits end with trying to debug this. I could really use some helpful suggestions. Thanks in advance for any help you can offer.<\/p>\n<p>If you&#8217;re interested in reviewing the apps, you can find there here:<\/p>\n<p>Live: http:\/\/apps.facebook.com\/rails_across_europe<\/p>\n<p>Dev: http:\/\/apps.facebook.com\/rails_dev<\/p>\n<p>Note that you must give the app permission to access your FB profile data.<\/p>\n<ol>\n<li>\n<p>Facebook caches external JS and CSS on FBML pages. Add a cache breaker to the JS URL:<\/p>\n<pre><code>http:\/\/example.com\/js.js?version=1\n<\/code><\/pre>\n<p>what I do to automatically keep in sync is, during development, I append the current timestamp as a version number. Then, when I go live, I increment the live URL by 1. I&#8217;ve automated this as well, and I suggest you do the same.<\/p>\n<\/li>\n<\/ol>\n<p id=\"rop\"><small>Originally posted 2013-11-09 20:01:37. <\/small><\/p>","protected":false},"excerpt":{"rendered":"<p>Since I posted this question, this issue has resolved itself. There must have been a glitch on Facebook or my dev server. Anyway, thanks to those of you who tried to help. I have a Facebook app that runs on two servers: a live server and a dev server. I was making some changes on [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1],"tags":[],"class_list":["post-503","post","type-post","status-publish","format-standard","hentry","category-uncategorized"],"_links":{"self":[{"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/posts\/503","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/comments?post=503"}],"version-history":[{"count":0,"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/posts\/503\/revisions"}],"wp:attachment":[{"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/media?parent=503"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/categories?post=503"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/tags?post=503"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}