If you have used the Types plugin in your Word Press site, you may come across this error:
"Warning: Missing argument 2 for types_render_field(), called in xxx.php on line xx and defined in..."
This is because the types_render_field now needs a second parameter which should be an array.
The parameters for field types:http://wp-types.com/documentation/functions/
The simple fix is:
Change this: "...types_render_field("xxx");"
To this: "...types_render_field("xxx", array('raw' => 'true'));"
Where "xxx" is your field name.
Happy coding!
Showing posts with label Word Press. Show all posts
Showing posts with label Word Press. Show all posts
Wednesday, April 10, 2013
Thursday, February 7, 2013
Word Press White Screen of Death... Fixed!
Word Press... I have mixed emotions about Word Press. It's free, so it's hard to get upset with Word Press, and there about a gazillion plugins. However, the admin side can be a bit complicated for clients - and for developers, Word Press cans sometimes cause you great pain, like when you get the dreaded "W-SOD" (White Screen Of Death).
Well, this is how I fixed the problem on one site recently. I'm telling you this to save you the day I wasted on the problem.
BEFORE YOU STUFF AROUND WITH UPGRADING WORD PRESS, SWITCHING THEMES OR DISABLING PLUGINS - DO THIS:
If you, like me had not recently made a code change, it's highly likely to be hosting related. Now, you may not be able to get the hosting company to agree with you at first, you need proof.
While you have the log files and debug turned on, check warnings and fix some of the small issues that may be kicking around too like deprecated features - will post about a few of these too.
I hope you can be lucky with a fix this simple too!
Well, this is how I fixed the problem on one site recently. I'm telling you this to save you the day I wasted on the problem.
BEFORE YOU STUFF AROUND WITH UPGRADING WORD PRESS, SWITCHING THEMES OR DISABLING PLUGINS - DO THIS:
If you, like me had not recently made a code change, it's highly likely to be hosting related. Now, you may not be able to get the hosting company to agree with you at first, you need proof.
- Check server logs, review errors and warnings.
You should be able to get to these from Control Panel.
Here you will see indication of the error below. - Turn on error checking in your config file.
Edit wp-config.php and change "false" to "true"
define('WP_DEBUG', false); - Now try to edit the post that shows a white screen, what do you see?
If you see something like:
Fatal error: Out of memory (allocated 26476544) (tried to allocate 122880 bytes)
Then you need to: - Send error to your hosting company and ask them to increase PHP memory allocation
- Then edit your config file again... and increase the size limit. (I made mine max of 512).
define('WP_MEMORY_LIMIT', '16M'); - MAKE SURE THEY REBOOT SERVER!
While you have the log files and debug turned on, check warnings and fix some of the small issues that may be kicking around too like deprecated features - will post about a few of these too.
I hope you can be lucky with a fix this simple too!
Sunday, June 17, 2012
Kill Deep Linking...
If you are using Word Press you not doubt are using plugins too... many of which have little foibles such as jQuery from prettyPhoto displaying extra info at end of your URL when you use a popover gallery or after closing it. To disable this, open your prettyPhoto.js file and set deep linking to false.
Also do this:
Replace: clearHashtag(){url=location.href;hashtag=(url.indexOf('#!prettyPhoto'))?true:false;if(hashtag)location.hash="!prettyPhoto";}
With: clearHashtag(){url=location.href;hashtag=(url.indexOf('#!'))?true:false;if(hashtag)location.hash="";}
No more "#!prettyPhoto" or other nonsense...
Enjoy!
Also do this:
Replace: clearHashtag(){url=location.href;hashtag=(url.indexOf('#!prettyPhoto'))?true:false;if(hashtag)location.hash="!prettyPhoto";}
With: clearHashtag(){url=location.href;hashtag=(url.indexOf('#!'))?true:false;if(hashtag)location.hash="";}
No more "#!prettyPhoto" or other nonsense...
Enjoy!
Subscribe to:
Posts (Atom)