Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Issue with plugin Metaslider after updating to WP 6.1 #1247

Closed
bagaweb opened this issue Nov 7, 2022 · 41 comments
Closed

Issue with plugin Metaslider after updating to WP 6.1 #1247

bagaweb opened this issue Nov 7, 2022 · 41 comments
Labels
plugin: others Concerns integration with other plugins

Comments

@bagaweb
Copy link

bagaweb commented Nov 7, 2022

Do not know if this issue is related to qTranslate-XT or the Metaslider plugin... anyway:

With WordPress 6.0.3 I was simply inserting these captions "[:en]English caption[:it]Italian caption" in the slider settings and it was working as expected, "English caption" was shown on the English version and "Italian caption" on the Italian version.

After updating to WordPress 6.1, captions are showing up like this even on front-end, "[:en]English caption[:it]Italian caption" on both English and Italian versions.

@vonsch76
Copy link

vonsch76 commented Nov 9, 2022

Edit
inc/slide/metaslide.image.class.php

search for
`//add caption

   if (strlen($slide['caption'])) {
        $html .= '<div class="caption-wrap"><div class="caption">' . $tst2. $slide['caption'] . '</div></div>';
    }`

change like this

`//add caption

	if (function_exists('qtranxf_useCurrentLanguageIfNotFoundUseDefaultLanguage')) $slide['caption']=qtranxf_useCurrentLanguageIfNotFoundUseDefaultLanguage($slide['caption']);
    if (strlen($slide['caption'])) {
        $html .= '<div class="caption-wrap"><div class="caption">' . $tst2. $slide['caption'] . '</div></div>';
    }`

@bagaweb
Copy link
Author

bagaweb commented Nov 10, 2022

Thanks a lot for you help @vonsch76 !
Your solution works.

Is the issue related to Metaslider plugin or WordPress 6.1. itself?
I suppose I should change those lines everytime Metaslider receives an update. Maybe is there a way to add some lines to functions.php file inside the theme?

@vonsch76
Copy link

Haven't really checked in details, but Metaslider would need to have a filter for that. At the moment there is no such. Also the issue would not exists if Metaslider would get the caption with a function like get_post().

@bagaweb
Copy link
Author

bagaweb commented Nov 11, 2022

Do you think we should point this issue to Metaslider authors?

@vonsch76
Copy link

Yes, I believe adding filters would be a valuable add-on.

@bagaweb
Copy link
Author

bagaweb commented Nov 14, 2022

What should I exactly ask?

@vonsch76
Copy link

vonsch76 commented Nov 14, 2022 via email

@vonsch76
Copy link

Seems that something has changed in Metaslider and it works now without extra code changes. Still testing, though.

@bagaweb
Copy link
Author

bagaweb commented Dec 21, 2022

I can read this on their changelog:

FIXED: Fix compatibility with plugin qTranslate-XT, #294;

But I can still see the same issue... What am I missing?

WordPress 6.1.1
qTranslate-XT 3.12.1
MetaSlider 3.28.2

Please have a look at campingmarmolada[dot]com

@vonsch76
Copy link

vonsch76 commented Dec 21, 2022

The closing backet.

Looks like

[:it]La tua vacanza in Val di Fassa[:en]Your holiday in Val di Fassa[:de]Ihr Urlaub in Fassatal[:fr]Vos vacances en Val di Fassa

While it should look like

[:it]La tua vacanza in Val di Fassa[:en]Your holiday in Val di Fassa[:de]Ihr Urlaub in Fassatal[:fr]Vos vacances en Val di Fassa[:]

for all strings to allow qTranslate-xt to operate.

@vonsch76
Copy link

@bagaweb
Copy link
Author

bagaweb commented Dec 22, 2022

While it should look like

[:it]La tua vacanza in Val di Fassa[:en]Your holiday in Val di Fassa[:de]Ihr Urlaub in Fassatal[:fr]Vos vacances en Val di Fassa[:]

for all strings to allow qTranslate-xt to operate.

I tried to add the closing bracket and now it looks as it is, e.g. closing bracket appering at the end of the caption... Still not separating the languages.

@vonsch76
Copy link

I have the same. Are the captions entered manually? Do you have any error codes?

@vonsch76
Copy link

Here is the code on the metaslider

inc/slide/metaslide.image.class.php:662: $html .= '

' . apply_shortcodes($slide['caption']) . '
';

the same repeats about 100 lines later.

you can still inster the same

if (function_exists('qtranxf_useCurrentLanguageIfNotFoundUseDefaultLanguage')) $slide['caption']=qtranxf_useCurrentLanguageIfNotFoundUseDefaultLanguage($slide['caption']);

before the slide caption in the worst case scenario.

@bagaweb
Copy link
Author

bagaweb commented Dec 23, 2022

I have the same. Are the captions entered manually? Do you have any error codes?

Please have a look at the attache screenshot:

screenshot-www campingmarmolada com-2022 12 23-12_37_31

@vonsch76
Copy link

vonsch76 commented Dec 23, 2022

Should see the server side what is happening. Obviously the filter is not running. Check if at qtranslate-xt setting in the advanced part the ml-slider and the ml-slide is checked.

@bagaweb
Copy link
Author

bagaweb commented Dec 23, 2022

Yes both ml-slide and ml-slider are checked in the advance settings of qtranslate-xt,

@vonsch76
Copy link

Only you have access to the backend, start checking in the ml code why the filter is not called. Try to change, call the filter manually, etc. Manual labour as usual.
Quoted where you should start. Others haven't reported, mine is different - as it works.

@bagaweb
Copy link
Author

bagaweb commented Dec 25, 2022

Yes I do have the access to the backend, how can I check this filter? Thanks for your help.

@vonsch76
Copy link

vonsch76 commented Jan 13, 2023

You have the code, save the $html in a file before and after. This is kind of DIY work.
I have installed the latest 3.28.3 and still seems fine. My WP is older though, I never install the newest in production environment.

@bagaweb
Copy link
Author

bagaweb commented Jan 13, 2023

Ok that might be the reason why it is working on your side! You older WP version.
I started having this issue after updating to 6.1.
Is there anyone here having my issue with WP 6.1, QTX 3.13.0 and MetaSlider 3.28.3?

@bagaweb
Copy link
Author

bagaweb commented Mar 8, 2023

MetaSlider has been updated to 3.29.0 and the issue with qTranslate-XT is still here.

@vonsch76
Copy link

vonsch76 commented Mar 8, 2023

Works flawless for me. Upgraded only for your sake. As I told you earlier the issue is something local with your setup.

@bagaweb
Copy link
Author

bagaweb commented Mar 10, 2023

Did you also update WordPress to its last version or just the plugin?

@vonsch76
Copy link

I never update to the latest WP, always behind with 1 major version.

@bagaweb
Copy link
Author

bagaweb commented Mar 10, 2023

That's why you don't see the error.
I'd like to understand if the issue is related to QTX rather tham MetaSlider.

@vonsch76
Copy link

Made a test with my other page. Newest WP 6.1.1, Metaslider 3.29.0 There is no error, qtranslate works as it should. Check for yourself https://portumlines.hu/en/metaslider-test/

@bagaweb
Copy link
Author

bagaweb commented Mar 19, 2023

Thanks for your feedback.

There must be some js and css loading errors on my side, please check this screenshot:
screenshot-portumlines hu-2023 03 19-23_02_10

@vonsch76
Copy link

vonsch76 commented Mar 20, 2023 via email

@herrvigg herrvigg added the plugin: others Concerns integration with other plugins label Mar 20, 2023
@bagaweb
Copy link
Author

bagaweb commented Mar 21, 2023

I have the same. Are the captions entered manually? Do you have any error codes?

Please have a look at the attache screenshot:

screenshot-www campingmarmolada com-2022 12 23-12_37_31

Thanks for your help @vonsch76

Do you have the same settings in your backend?

@bagaweb
Copy link
Author

bagaweb commented Mar 21, 2023

Anyway, on the troubleshooting section, there are these info:

{ "PHP_VERSION": "7.4.3", "WP_VERSION": "6.1.1", "QTX_VERSION": "3.13.0", "Plugins": [ "MetaSlider 3.29.1", "qTranslate-XT 3.13.0" ] }

@bagaweb
Copy link
Author

bagaweb commented Mar 21, 2023

{ "default_language": "it", "enabled_languages": [ "it", "en", "de", "fr" ], "flag_location": "plugins/qtranslate-xt/flags/", "language_name": { "it": "IT", "en": "EN", "de": "DE", "fr": "FR" }, "locale": { "it": "it_IT", "en": "en_US", "de": "de_DE", "fr": "fr_FR" }, "locale_html": { "it": "", "en": "", "de": "", "fr": "" }, "not_available": { "it": "Ci spiace, ma questo articolo è disponibile soltanto in %LANG:, : e %.", "en": "Sorry, this entry is only available in %LANG:, : and %.", "de": "Leider ist der Eintrag nur auf %LANG:, : und % verfügbar.", "fr": "Désolé, cet article est seulement disponible en %LANG:, : et %." }, "date_format": { "it": "%e %B %Y", "en": "%A %B %e%q, %Y", "de": "%A, \\d\\e\\r %e. %B %Y", "fr": "%A %e %B %Y" }, "time_format": { "it": "%H:%M", "en": "%I:%M %p", "de": "%H:%M", "fr": "%H:%M" }, "flag": { "it": "it.png", "en": "gb.png", "de": "de.png", "fr": "fr.png" }, "url_mode": 2, "use_strftime": 3, "filter_options_mode": 0, "language_name_case": 0, "detect_browser_language": true, "hide_untranslated": false, "show_menu_alternative_language": false, "show_displayed_language_prefix": true, "show_alternative_content": false, "hide_default_language": true, "use_secure_cookie": false, "header_css_on": false, "header_css": ".qtranxs_flag_it {background-image: url(https://www.campingmarmolada.com/wp-content/plugins/qtranslate-xt/flags/it.png); background-repeat: no-repeat;}\r\n.qtranxs_flag_en {background-image: url(https://www.campingmarmolada.com/wp-content/plugins/qtranslate-xt/flags/gb.png); background-repeat: no-repeat;}\r\n.qtranxs_flag_de {background-image: url(https://www.campingmarmolada.com/wp-content/plugins/qtranslate-xt/flags/de.png); background-repeat: no-repeat;}\r\n.qtranxs_flag_fr {background-image: url(https://www.campingmarmolada.com/wp-content/plugins/qtranslate-xt/flags/fr.png); background-repeat: no-repeat;}\r\n", "text_field_filters": [], "term_name": [], "disable_client_cookies": false, "ignore_file_types": [ "gif", "jpg", "jpeg", "png", "svg", "pdf", "swf", "tif", "rar", "zip", "7z", "mpg", "divx", "mpeg", "avi", "css", "js", "mp3", "mp4", "apk" ], "url_info": { "cookie_lang_front": "it", "cookie_lang_admin": "it", "cookie_front_or_admin_found": true, "scheme": "http", "host": "localhost", "path": "/campingmarmolada.com/wp-admin/admin-ajax.php", "query": "action=admin_debug_info", "path-base": "/campingmarmolada.com", "wp-path": "/wp-admin/admin-ajax.php", "language_neutral_path": true, "http_referer": "https://www.campingmarmolada.com/wp-admin/options-general.php?page=qtranslate-xt", "referer_admin": true, "doing_front_end": false, "lang_cookie_admin": "it", "lang_admin": "it", "language": "it", "set_cookie": false }, "language": "it", "editor_mode": 0, "highlight_mode": 1, "auto_update_mo": true, "hide_lsb_copy_content": false, "lsb_style": "Simple_Tabs.css", "config_files": [ "./i18n-config.json" ], "custom_i18n_config": [], "custom_fields": [], "custom_field_classes": [], "post_type_excluded": [], "admin_enabled_modules": { "slugs": true, "acf": false, "all-in-one-seo-pack": false, "events-made-easy": false, "jetpack": false, "google-site-kit": false, "gravity-forms": false, "woo-commerce": false, "wp-seo": false }, "translator": {}, "qtrans_compatibility": false }

@vonsch76
Copy link

vonsch76 commented Mar 21, 2023 via email

@bagaweb
Copy link
Author

bagaweb commented Mar 21, 2023

I should try to upgrade to PHP 8.1 and see what happens.

@vonsch76
Copy link

vonsch76 commented Mar 21, 2023 via email

@bagaweb
Copy link
Author

bagaweb commented Mar 21, 2023

No other plugins are active.

@vonsch76
Copy link

vonsch76 commented Mar 22, 2023 via email

@bagaweb
Copy link
Author

bagaweb commented Mar 22, 2023

Check at advanced whether ml-slider and ml-slide is enabled for translation.

Yes that was already been checked.
Will you be so kind to send me some screenshots or the troubleshooting export?

@herrvigg
Copy link
Collaborator

herrvigg commented Apr 2, 2023

Can someone summarize the status of this ticket?
From QTX 3.14.0 the debug information becomes more compact, to help reproducing the problems.

@vonsch76
Copy link

vonsch76 commented Apr 2, 2023

Seems some isolated problem at @bagaweb with regard the translation of the language. Tried, but unable to reproduce, works fine on my end.

@bagaweb
Copy link
Author

bagaweb commented Apr 4, 2023

{ "PHP_VERSION": "7.4.3", "WP_VERSION": "6.2", "QTX_VERSION": "3.14.0", "Plugins": [ "MetaSlider 3.29.1", "qTranslate-XT 3.14.0" ] }

I can confirm with the latest updates the problem is finally solved!!!
We can close this issue.
Thank you

@bagaweb bagaweb closed this as completed Apr 4, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
plugin: others Concerns integration with other plugins
Projects
None yet
Development

No branches or pull requests

3 participants