When saving a post with the title Jule's Gormet
, it gets formatted as Jule's Gormet
. If I save it again, it becomes Jule's Gormet
.
Following this pattern, it keeps escaping the ampersand and getting worse.
More info
- WordPress version: 3.3.2
- Theme: http://themetrust.com‘s Reveal (heavily modified)
- DB is UTF-8
- settings>reading has encoding set to UTF-8
- values are being stored in the database as
Jule's
(etc..)
I’ve disabled all plugins and the problem persists.
I’ve gone through functions.php
pretty well, and didn’t find anything suspicious.
I followed the troubleshooting guide in the brasofilo’s comment – but to no effect. Any ideas?
Added this code per tommix
function get_post_title($title) {
wp_mail('zlysobey@gmail.com','the title',$title); return $title;
} add_filter ('title_save_pre','get_post_title');
Which Yielded these results:
- Jule’s Gormet – 1st
attemptsave - Jule’s Gormet – 2nd
attemptsave - Jule's Gormet – 3rd
attemptsave - Jule's Gormet – 4th
attemptsave
It actually sent 2 emails per save operation – maybe it means something? idk.
On the Trail!
so, I bit the bullet and started in on a fresh install – using all the edited theme code. After liberally deleting stuff from the functions.php
, I found the issue is somehow related to Bainternet’s Tax-meta-class I’m using to add a field to one of my custom taxonomies. Removing the following code fixes the issue. (though I’d like to figure out how to fix it while retaining my added taxonomy field.
// CUSTOM TAXONOMY FIELDS
require_once("Tax-meta-class/Tax-meta-class.php");
$config = array(
'id' => 'focus_creative_services',
'title' => 'creative services',
'pages' => array('focus'),
'context' => 'normal',
'fields' => array(),
'local_images' => false,
'use_with_theme' => true
);
$creative_services_meta = new Tax_Meta_Class($config);
$creative_services_meta->addTextarea('textarea_field_id',array('name'=> 'Creative Services '));
$creative_services_meta->Finish();
I dropped a note to @Bainternet on his websites FAQ. Hopefully he’ll sort me out.
EDIT:
Disable magic_quotes_gpc in your server.
try adding in .HTACCESS file (if you on shared hosting):
php_flag magic_quotes_gpc off
If you’ll get 500 server error after you added it – delete it and put this:
ini_set ('magic_quotes_gpc', 0);
in theme’s functions.php file. And with function bellow check is it on.You can create php file with this content to test is it on (if on you’ll see this nice string):
2nd try:
If the magic quotes was ok, than MAYBE you can try and search in your plugins, and theme’s php files (with textcrawler) do some of them uses
stripslashes
function on title?