lkraav
Forum Replies Created
-
Yes, as of WCML 1.3 I also had to force translate all slugs into english originals, overriding woocommerce built-in .mo files. I have not tested 1.4 for this yet.
Great call @jakhoe, too bad I was re-inventing the wheel on this last night ??
Indeed, manual de+reactivated fixed 2.3.0 for me. “Unknown column ‘day_no_time’ in ‘field list” only manifested itself for a user who was not logged in.
Wdym “my plugin”? WPML Media Translator is another official WPML plugin. Check their download section.
Forum: Plugins
In reply to: [Taxonomy Images] Incorrect category key (sometimes one or two off)So this seems to caused by term_id and term_taxonomy_id somehow being different:
4 (Object) stdClass
term_id (String, 2 characters ) 59
name (String, 19 characters ) Public Building
slug (String, 19 characters ) public-building
term_group (String, 1 characters ) 0
term_taxonomy_id (String, 2 characters ) 60
taxonomy (String, 16 characters ) product_category
description (String, 0 characters )
parent (String, 2 characters ) 87
count (String, 1 characters ) 2
cat_ID (String, 2 characters ) 59
category_count (String, 1 characters ) 2
category_description (String, 0 characters )
cat_name (String, 19 characters ) Public Log Building
category_nicename (String, 19 characters ) public-log-building
category_parent (String, 2 characters ) 87How exactly would this happen and why?
Forum: Plugins
In reply to: [Taxonomy Images] Incorrect category key (sometimes one or two off)I’m pretty sure I’m running into this exact thing. Real category ID is 59 but the image is assigned to category ID 60. At the same time, admin display everything correctly.. Very confusing. Perhaps this topic could be switched back to unresolved status?
Thank you! This was killing me when WPML root language URL /en/ was constantly redirecting to some content page. I didn’t even know that Redirection automatically keeps track of Modified Posts, so never would’ve thought to look there.
Yes I already added the isset() call as well. Hopefully you can version bump with this soon.
Forum: Plugins
In reply to: [Redirection] [Plugin: Redirection] Unable to export CSVI’m seeing this in error_log on export:
NOTICE: wp-content/plugins/redirection/models/match.php:28 – unserialize() [function.unserialize]: Error at offset 0 of 9 bytes
Yeah, the diff wasn’t anything significant. Anyway, write here if you get stuck anywhere, I can probably help.
(y) as you probably know, WPML just relased 2.5.0, WPML Media was also bumped to 1.3.0 I believe.
Forum: Plugins
In reply to: ImageFX not working for portfolio itemsAm I seeing this correctly? ‘wp_generate_attachment_metadata’ doesn’t get applied when uploading featured image?
Nevermind: it does get run, continuing debugging
Forum: Plugins
In reply to: ImageFX not working for portfolio itemsI think I’m running into the same issue. I’m trying to get grayscale versions of featured images generated, but ImageFX doesn’t seem to hook into anything but Add New in Media section.
Digging into code now. I doubt this is actually an intended “feature”?
OK so this would be a start to protect translations, but it’s more complicated than that:
25 function mfrh_attachment_notice() { 26 echo "<div class=\"updated\">Media File Renamer: File was not renamed, because it was not in the default language</div>"; 27 } 28 29 function mfrh_attachment_fields_to_save( $post, $attachment ) { 30 // Make sure we only operate on filenames of default language 31 // Symlinking to other languages could be an option, but requires platform specific handling 32 global $sitepress, $WPML_media; 33 34 if ( $WPML_media ) { 35 $translations = $WPML_media->_get_translations( $post[ "ID" ] ); 36 if ( $sitepress && ! empty( $translations ) && $post[ "ID" ] != $translations[ $sitepress->get_default_language() ] ) { 37 # admin_notices doesn't work here for some reason 38 add_action( "admin_notices", "mfrh_attachment_notice" ); 39 return $post; 40 } 41 }
Problem is the “Duplicate uploaded media to translations” checkbox. If this is on for a post, it will fire immediately for all attachments if you edit any original language attachments.
This means MFR will have to the a thorough
$translations = $WPML_media->_get_translations( $post[ "ID" ] );
type thing lower in the code as well, probably somewhere at, looping through all the translations and saving the new filename into all translations:
85 // Update the attachment meta 86 $meta = wp_get_attachment_metadata( $post['ID'] );
Right now, one would have to make sure no posts have automatic duplication checked, then process all filenames in default language, and then enable automatic duplication to translations.
My patch doesn’t actually seem to work, those functions don’t return the correct language information. Must look through Media Translator source to see how they process media language info.