Closed GoogleCodeExporter closed 8 years ago
[deleted comment]
[deleted comment]
[deleted comment]
[deleted comment]
Just realised it is renaming meta_keys: It's renaming the TO meta_key to
"target_value". Still not insurmountable manually, but a bit more of a pain as
I'll need to manually run the change on the MYSQL database after each 'merge',
rather than doing all the merges in WP, then all the renaming in MYSQL
(because, obviously, all of the meta_key fields are being renamed to the same
thing).
Could this be something as simple as different MYSQL versions, where the
version(s) the plugin is written for uses a different syntax to the version on
my offline server? In case that sounds likely/possible, my offine server
version info is ...
DATABASE SERVER:
Software: MySQL
Software version: 5.1.41 - Source distribution
Protocol version: 10
User: root@localhost
Server charset: UTF-8 Unicode (utf8)
WEBSERVER:
Apache/2.2.14 (Win32) DAV/2 mod_ssl/2.2.14 OpenSSL/0.9.8l mod_autoindex_color
PHP/5.3.1
Database client version: libmysql - 5.1.41
PHP extension: mysql
Original comment by kevin...@gmail.com
on 12 Mar 2014 at 10:31
I've just tried the same operation on the live database - it appears to have
the same result:
Merging field1 (meta_key = "1") into field2 (meta_key = "2") results in field1
meta_key staying the same at "1", field2 meta_key changed to "target_value".
The MYSQL version on the live server is 5.5.35
I can give you access to both the site admin side and to the database if you
want \ need it. (Though I'll have to think for a few minutes for the latter ...
never done that before! :-) ) Let me have an email address to send logon
credentials and a couple of simple pleas to, if so.
Original comment by kevin...@gmail.com
on 12 Mar 2014 at 11:35
Thanks for the report.
To fix: controllers/merge_custom_fields.php line 37 should read:
$query = $wpdb->prepare("UPDATE {$wpdb->postmeta} SET meta_key=%s WHERE
meta_key=%s;"
, $_POST['merge_target']
, $field_name);
Committed revision 873985.
Original comment by ever...@fireproofsocks.com
on 12 Mar 2014 at 11:58
Wow! What a fantastically quick response and fast resolution! No wonder CCTM is
one of my two all-time favourite and 'can't live without' plugins. :-)
Have applied the fix, tested it, and it seems to work perfectly. :-)) And
before I'd even really started my manual journey.
Many, many, many thanks! :-))
Original comment by kevin...@gmail.com
on 12 Mar 2014 at 12:14
Original issue reported on code.google.com by
kevin...@gmail.com
on 12 Mar 2014 at 9:32