{"id":1809,"date":"2012-06-22T23:56:40","date_gmt":"2012-06-22T18:26:40","guid":{"rendered":"https:\/\/www.suramya.com\/blog\/?p=1809"},"modified":"2012-06-23T00:14:07","modified_gmt":"2012-06-22T18:44:07","slug":"bug-in-fb-publication-script-fixed-other-blog-woes","status":"publish","type":"post","link":"https:\/\/www.suramya.com\/blog\/2012\/06\/bug-in-fb-publication-script-fixed-other-blog-woes\/","title":{"rendered":"Bug in FB Publication script fixed + Other Blog woes"},"content":{"rendered":"<p>Fixed a small bug in the Facebook publication script that I had written, basically if the first para was over 1000 characters the post would fail. At first I thought I would just do a substr and limit the character to 900, but that didn&#8217;t work for some reason and I got some really weird posts on FB. But it looks like its working fine now and the last post came up on on Facebook. \ud83d\ude42<\/p>\n<p>There was another issue which I had faced a couple of days ago on the blog and wanted to document. Basically whenever I tried posting any comment or new post on the blog I would get a really weird error message that made absolutely no sense: <\/p>\n<pre class='code'>Are you sure you want to do this? Please try again.<\/pre>\n<p>After spending a couple of hours on the web over a period of few days trying to get things working, I found a post explaining how to turn DEBUGGING ON in WordPress (See below for instructions) and once I enabled that I found out that the DB I was using was over the max size my hosting company allowed so all inserts were failing, removed  junk from the DB (Stats etc) and I was good to go.<\/p>\n<p>To enable debugging follow these steps:<\/p>\n<ul>\n<li>Open <i>wp-config.php<\/i> located in the wordpress blog&#8217;s root directory<\/li>\n<li>Add the following line to the file:\n<pre class='code'>define('WP_DEBUG', true);<\/pre>\n<\/li>\n<li>Save the file and Exit<\/li>\n<\/ul>\n<p>Once you finish debugging you should either comment out the above line or delete it from the file, otherwise a lot of debug information will be shown to your visitors and that is something you don&#8217;t really want. <\/p>\n<p>Hope this helps others.<\/p>\n<p>&#8211; Suramya<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Fixed a small bug in the Facebook publication script that I had written, basically if the first para was over 1000 characters the post would fail. At first I thought I would just do a substr and limit the character to 900, but that didn&#8217;t work for some reason and I got some really weird [&hellip;]<\/p>\n","protected":false},"author":2,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"activitypub_content_warning":"","activitypub_content_visibility":"","activitypub_max_image_attachments":3,"activitypub_interaction_policy_quote":"","activitypub_status":"","footnotes":""},"categories":[24,10],"tags":[],"class_list":["post-1809","post","type-post","status-publish","format-standard","hentry","category-knowledgebase","category-website-updates"],"_links":{"self":[{"href":"https:\/\/www.suramya.com\/blog\/wp-json\/wp\/v2\/posts\/1809","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.suramya.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.suramya.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.suramya.com\/blog\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/www.suramya.com\/blog\/wp-json\/wp\/v2\/comments?post=1809"}],"version-history":[{"count":1,"href":"https:\/\/www.suramya.com\/blog\/wp-json\/wp\/v2\/posts\/1809\/revisions"}],"predecessor-version":[{"id":1810,"href":"https:\/\/www.suramya.com\/blog\/wp-json\/wp\/v2\/posts\/1809\/revisions\/1810"}],"wp:attachment":[{"href":"https:\/\/www.suramya.com\/blog\/wp-json\/wp\/v2\/media?parent=1809"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.suramya.com\/blog\/wp-json\/wp\/v2\/categories?post=1809"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.suramya.com\/blog\/wp-json\/wp\/v2\/tags?post=1809"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}