Translations won't work

Hi guys,

Here we go again.
I have updated the xtheme and wpml to latest and i cant translate anything i keep getting the following error:

E_ERROR: Uncaught Error: Call to a member function get_element_id() on null in /customers/5/e/3/waxandgold.com/httpd.www/lightflow/wp-content/plugins/sitepress-multilingual-cms/classes/url-handling/class-wpml-enpoints-support.php:174
Stack trace:
#0 /customers/5/e/3/waxandgold.com/httpd.www/lightflow/wp-includes/class-wp-hook.php(288): WPML_Endpoints_Support->endpoint_permalink_filter('https://lightfl...', 19820)
#1 /customers/5/e/3/waxandgold.com/httpd.www/lightflow/wp-includes/plugin.php(203): WP_Hook->apply_filters('https://lightfl...', Array)
#2 /customers/5/e/3/waxandgold.com/httpd.www/lightflow/wp-includes/link-template.php(331): apply_filters('page_link', 'https://lightfl...', 19820, false)
#3 /customers/5/e/3/waxandgold.com/httpd.www/lightflow/wp-includes/link-template.php(144): get_page_link(Object(WP_Post), false, false)
#4 /customers/5/e/3/waxandgold.com/httpd.www/lightflow/wp-includes/post.php(3536): get_permalink(Object(WP_Post))
#5 /customers/5/e/3/waxandgold.com/httpd.www/lightflow/wp-content/plugins/si in /customers/5/e/3/waxandgold.com/httpd.www/lightflow/wp-content/plugins/sitepress-multilingual-cms/classes/url-handling/class-wpml-enpoints-support.php on line 174.

Hello There,

Please follow up the steps below:

  1. Check the version of WordPress, ensure it’s 4.9.8: https://wordpress.org/download/
  2. Ensure everything is up to date according to our version compatibility list here. Please follow the best practices when updating your theme and plugins. Click here for more information.
  3. Go to X > Settings and click on the Clear Style Cache button.
  4. If you’re using a CDN(ex: CloudFlare), please clear the CDN’s cache and disable optimization services. For the CloudFlare you also need to follow the steps below besides the developer mode: https://xthemetips.com/using-cloudflare-rocket-loader-with-x-pro-and-x5/928/1
  5. Test for a plugin conflict. You can do this by deactivating all third-party plugins, and see if the problem remains. If it’s fixed, you’ll know a plugin caused the problem, and you can narrow down which one by reactivating them one at a time.
  6. Remove custom CSS and Javascript from the options or Child Theme and test the case.
  7. Switch to the parent theme to check if the issue persists.
  8. Reset your htaccess file by renaming it to .htaccess-bak. Then in WP Admin Menu, go to Settings > Permalinks and just click the Save Changes button.
  9. Make sure that you’re running at least PHP v5.6.x or later to avoid any WordPress related incompatibility issues. If you’re not sure what your server configurations and settings are, install a plugin like WP-Serverinfo (https://wordpress.org/plugins/wp-serverinfo/) and check your server info by head over to Dashboard -> WP Serverinfo area.
  10. Check your PHP Max Execution Time and set it for 120 for optimal usage (https://thimpress.com/knowledge-base/how-to-increase-maximum-execution-time-for-wordpress-site/).
  11. Increase the PHP Memory Limit of your server. Click here for more detailed information and how to increase the PHP memory limit.

If you still have problems kindly get back to us with the result of the steps above and URL/User/Pass of your WordPress dashboard using the Secure Note functionality of the post to follow up the case.

Thank you.

hi thai,

Done all that, still not working.

this is the response when i try to translate the page using cornerstone->clicking the flags:
{“success”:false,“debug”:{“peak_memory”:85606184,“php_errors”:[“E_ERROR: Uncaught Error: Call to a member function get_element_id() on null in /customers/5/e/3/waxandgold.com/httpd.www/lightflow/wp-content/plugins/sitepress-multilingual-cms/classes/url-handling/class-wpml-enpoints-support.php:174\nStack trace:\n#0 /customers/5/e/3/waxandgold.com/httpd.www/lightflow/wp-includes/class-wp-hook.php(288): WPML_Endpoints_Support->endpoint_permalink_filter(‘https://lightfl…’, 19828)\n#1 /customers/5/e/3/waxandgold.com/httpd.www/lightflow/wp-includes/plugin.php(203): WP_Hook->apply_filters(‘https://lightfl…’, Array)\n#2 /customers/5/e/3/waxandgold.com/httpd.www/lightflow/wp-includes/link-template.php(331): apply_filters(‘page_link’, ‘https://lightfl…’, 19828, false)\n#3 /customers/5/e/3/waxandgold.com/httpd.www/lightflow/wp-includes/link-template.php(144): get_page_link(Object(WP_Post), false, false)\n#4 /customers/5/e/3/waxandgold.com/httpd.www/lightflow/wp-includes/post.php(3536): get_permalink(Object(WP_Post))\n#5 /customers/5/e/3/waxandgold.com/httpd.www/lightflow/wp-content/plugins/si in /customers/5/e/3/waxandgold.com/httpd.www/lightflow/wp-content/plugins/sitepress-multilingual-cms/classes/url-handling/class-wpml-enpoints-support.php on line 174.”]},“fatal_error”:true}

Hi Cecilia,

This is my first time seeing this kind of error and it’s originating from WPML itself. Please try contacting the WPML author to find out what’s the error is.

For the meantime, would you mind providing your FTP login credentials as well. I’m getting different error than you provided.

Thanks!

Hi Rad,

Yes, first i get the following:
cs-vendor.js?ver=3.3.8:3089 Uncaught TypeError: n.get is not a function
at cs.js?ver=3.3.8:987
at g (cs-vendor.js?ver=3.3.8:3659)
at L (cs-vendor.js?ver=3.3.8:3667)
at _ (cs-vendor.js?ver=3.3.8:3665)
at e.invoke (cs-vendor.js?ver=3.3.8:1878)
at e.flush (cs-vendor.js?ver=3.3.8:1871)
at e.flush (cs-vendor.js?ver=3.3.8:1882)
at e._end (cs-vendor.js?ver=3.3.8:1936)
at e.end (cs-vendor.js?ver=3.3.8:1892)
at e._run (cs-vendor.js?ver=3.3.8:1937)

then the the other one.

Hi,

I have increased memory limit and maximum execution time by adding the code below in your wp-config.php file

set_time_limit(300);
define( 'WP_MEMORY_LIMIT', '512M' );
define( 'WP_MAX_MEMORY_LIMIT', '1024M' );

I checked and It seems to have fixed the issue.

Please check in your end.

Thanks

Hi Paul,

Im still getting same errors:

  • this one first:
    cs-vendor.js?ver=3.3.8:3089 Uncaught TypeError: n.get is not a function
    at cs.js?ver=3.3.8:987
    at g (cs-vendor.js?ver=3.3.8:3659)
    at L (cs-vendor.js?ver=3.3.8:3667)
    at _ (cs-vendor.js?ver=3.3.8:3665)
    at e.invoke (cs-vendor.js?ver=3.3.8:1878)
    at e.flush (cs-vendor.js?ver=3.3.8:1871)
    at e.flush (cs-vendor.js?ver=3.3.8:1882)
    at e._end (cs-vendor.js?ver=3.3.8:1936)
    at e.end (cs-vendor.js?ver=3.3.8:1892)
    at e._run (cs-vendor.js?ver=3.3.8:1937)

Then this one:
jquery.js?ver=1.12.4:4 POST https://lightflow.waxandgold.com/de/cornerstone-endpoint/ 500
send @ jquery.js?ver=1.12.4:4
ajax @ jquery.js?ver=1.12.4:4
submitRequest @ cs.js?ver=3.3.8:2388
(anonymous) @ cs.js?ver=3.3.8:2378
(anonymous) @ cs-vendor.js?ver=3.3.8:3681
e @ cs-vendor.js?ver=3.3.8:3681
promise @ cs.js?ver=3.3.8:2378
requestBatch @ cs.js?ver=3.3.8:2380
e._run @ cs-vendor.js?ver=3.3.8:1937
(anonymous) @ cs-vendor.js?ver=3.3.8:1927
setTimeout (async)
setTimeout @ cs-vendor.js?ver=3.3.8:1860
e.debounce @ cs-vendor.js?ver=3.3.8:1926
e.debounce @ cs-vendor.js?ver=3.3.8:1077
(anonymous) @ cs.js?ver=3.3.8:2375
(anonymous) @ cs-vendor.js?ver=3.3.8:3681
e @ cs-vendor.js?ver=3.3.8:3681
request @ cs.js?ver=3.3.8:2374
createTranslation @ cs.js?ver=3.3.8:1003
e._join @ cs-vendor.js?ver=3.3.8:1936
e.join @ cs-vendor.js?ver=3.3.8:1903
u @ cs-vendor.js?ver=3.3.8:1082
s @ cs-vendor.js?ver=3.3.8:5604
sendAction @ cs-vendor.js?ver=3.3.8:3294
create @ cs.js?ver=3.3.8:49
send @ cs-vendor.js?ver=3.3.8:3296
c @ cs-vendor.js?ver=3.3.8:3253
copyExisting @ cs.js?ver=3.3.8:48
e._run @ cs-vendor.js?ver=3.3.8:1937
e._join @ cs-vendor.js?ver=3.3.8:1936
e.join @ cs-vendor.js?ver=3.3.8:1903
u @ cs-vendor.js?ver=3.3.8:1082
(anonymous) @ cs-vendor.js?ver=3.3.8:2323
o @ cs-vendor.js?ver=3.3.8:994
(anonymous) @ cs-vendor.js?ver=3.3.8:2323
cs.js?ver=3.3.8:2384 Cornerstone detected PHP Errors while generating an AJAX response. Logging errors…
errorBubbling @ cs.js?ver=3.3.8:2384
handleResponse @ cs.js?ver=3.3.8:2382
r @ cs.js?ver=3.3.8:2387
e._run @ cs-vendor.js?ver=3.3.8:1937
e.run @ cs-vendor.js?ver=3.3.8:1901
h @ cs-vendor.js?ver=3.3.8:1082
(anonymous) @ cs.js?ver=3.3.8:2388
(anonymous) @ jquery.js?ver=1.12.4:2
i @ jquery.js?ver=1.12.4:2
fireWith @ jquery.js?ver=1.12.4:2
y @ jquery.js?ver=1.12.4:4
c @ jquery.js?ver=1.12.4:4
XMLHttpRequest.send (async)
send @ jquery.js?ver=1.12.4:4
ajax @ jquery.js?ver=1.12.4:4
submitRequest @ cs.js?ver=3.3.8:2388
(anonymous) @ cs.js?ver=3.3.8:2378
(anonymous) @ cs-vendor.js?ver=3.3.8:3681
e @ cs-vendor.js?ver=3.3.8:3681
promise @ cs.js?ver=3.3.8:2378
requestBatch @ cs.js?ver=3.3.8:2380
e._run @ cs-vendor.js?ver=3.3.8:1937
(anonymous) @ cs-vendor.js?ver=3.3.8:1927
setTimeout (async)
setTimeout @ cs-vendor.js?ver=3.3.8:1860
e.debounce @ cs-vendor.js?ver=3.3.8:1926
e.debounce @ cs-vendor.js?ver=3.3.8:1077
(anonymous) @ cs.js?ver=3.3.8:2375
(anonymous) @ cs-vendor.js?ver=3.3.8:3681
e @ cs-vendor.js?ver=3.3.8:3681
request @ cs.js?ver=3.3.8:2374
createTranslation @ cs.js?ver=3.3.8:1003
e._join @ cs-vendor.js?ver=3.3.8:1936
e.join @ cs-vendor.js?ver=3.3.8:1903
u @ cs-vendor.js?ver=3.3.8:1082
s @ cs-vendor.js?ver=3.3.8:5604
sendAction @ cs-vendor.js?ver=3.3.8:3294
create @ cs.js?ver=3.3.8:49
send @ cs-vendor.js?ver=3.3.8:3296
c @ cs-vendor.js?ver=3.3.8:3253
copyExisting @ cs.js?ver=3.3.8:48
e._run @ cs-vendor.js?ver=3.3.8:1937
e._join @ cs-vendor.js?ver=3.3.8:1936
e.join @ cs-vendor.js?ver=3.3.8:1903
u @ cs-vendor.js?ver=3.3.8:1082
(anonymous) @ cs-vendor.js?ver=3.3.8:2323
o @ cs-vendor.js?ver=3.3.8:994
(anonymous) @ cs-vendor.js?ver=3.3.8:2323
cs.js?ver=3.3.8:2384 E_ERROR: Uncaught Error: Call to a member function get_element_id() on null in /customers/5/e/3/waxandgold.com/httpd.www/lightflow/wp-content/plugins/sitepress-multilingual-cms/classes/url-handling/class-wpml-enpoints-support.php:174
Stack trace:
#0 /customers/5/e/3/waxandgold.com/httpd.www/lightflow/wp-includes/class-wp-hook.php(288): WPML_Endpoints_Support->endpoint_permalink_filter(‘https://lightfl…’, 19854)
#1 /customers/5/e/3/waxandgold.com/httpd.www/lightflow/wp-includes/plugin.php(203): WP_Hook->apply_filters(‘https://lightfl…’, Array)
#2 /customers/5/e/3/waxandgold.com/httpd.www/lightflow/wp-includes/link-template.php(331): apply_filters(‘page_link’, ‘https://lightfl…’, 19854, false)
#3 /customers/5/e/3/waxandgold.com/httpd.www/lightflow/wp-includes/link-template.php(144): get_page_link(Object(WP_Post), false, false)
#4 /customers/5/e/3/waxandgold.com/httpd.www/lightflow/wp-includes/post.php(3536): get_permalink(Object(WP_Post))
#5 /customers/5/e/3/waxandgold.com/httpd.www/lightflow/wp-content/plugins/si in /customers/5/e/3/waxandgold.com/httpd.www/lightflow/wp-content/plugins/sitepress-multilingual-cms/classes/url-handling/class-wpml-enpoints-support.php on line 174.

Hi Cecilia,

The error doesn’t display the exact culprit but it’s one of your WPML plugin. Please try deactivating just all of your WPML plugin (except and don’t deactivate the main WPML which is the WPML Multilingual CMS).

And it will start working, one of them is the cause of the issue. Activate them again one by one and one and once it stopped working again then the last activate WPML plugin is the culprit.

Thanks!

Hi Rad,

Thanks, the problem plugin is WPML String Translation, however, deactivating that it allows me to finally translate the page but if i am trying to edit the translated page it wont work, it will delete content.
Below it’s a link where you can test:
-translate the page to german(all good)
-edit the page in german->save (content missing)

https://lightflow.waxandgold.com/wpml-test/

Hi Cecilia,

Looks like it’s caused by one of your plugins too, I’m able to translate it with just two active plugins (Cornerstone and main WPML plugin). Please check the test page and I’m able to change the title.

Please do the same on other plugins until you find the culprit.

Thanks!

Hi Rad,

i have found the second culprit: Advanced Custom Fields Multilingual - without this the translations work.

The problem plug ins:

  1. WPML String Translation - WooCommerce Multilingual is enabled but not effective. It requires WPML String Translation in order to work.

2.Advanced Custom Fields Multilingual

Questions:

  1. I do need Woocommerce translated, if WPML String Translation doesnt work whats the solution?
  2. Advanced Custom Fields Multilingual - i am using ACF, how will this affect me?

Thanks.

Hey Cecilia,

This case needs to be reported in our issue tracker for further investigation. For now if you need the 2 plugins, regretfully, you will not be able to use Cornerstone. We’re sorry but this is currently a trade-off.

Thank you for understanding.

Hi Christian,

Trade off#??!!!
Do you know the amount of work that went into it?
It’s an ecommerce website!! What am i supposed to do? I need to launch!!
This is what you guys are advertising:
Over 20 Extensions (plugins) created by Themeco and 3rd parties to work seamlessly with X.
They can be instantly downloaded and automatically updated with each verified purchase. Oh, and they are all free!
Need a Shop? Full WooCommerce Integration + 4 Unique Shop Designs = Selling Versatility!

I understand your frustration, Cecilia. I said:

That is the currently the case. I say currently because generally, the support staff currently are not capable to fix this issue and this needs further investigation that is why I have posted this in our issue tracker.

Regarding WPML compatibility, WPML is compatible with X and Cornerstone. Translation (including saving) works as I’ve personally checked other users’ sites with WPML.

What’s happening here is WPML extensions conflict. We surely would want all WPML extensions to work but because there are numerous extensions, it is not feasible to test each and every one for a variety of use cases. This is why I reported your case.

You said the Advanced Custom Fields Multilingual is causing the saving issue. Maybe you can disable just this one so you can use WPML String Translation?

I also missed to say that for this error: POST https://lightflow.waxandgold.com/de/cornerstone-endpoint/ 500, please try contacting your host if they are blocking cornerstone-endpoint usually from Mod Security. Please ask them to whitelist that directory.

Also try reinstalling WordPress by going to Dashboard > Updates and clicking the Re-install Now button.

I understand that you have a tight deadline but we would need your patience regarding this.

Thank you.

hi Christian,

I understand that you can’t keep up with all the plugins, but “Advanced Custom Fields Multilingual” is not the real issue here, the real issue is WPML String Translation, this is not a new plugin.
With WPML String Translation activated i get the following:
https://lightflow.waxandgold.com/de/cornerstone-endpoint/500
Rejecting AJAX promise - cs.js?ver=3.3.8:2384
Error creating translation {} - cs.js?ver=3.3.8:1003
And without WPML String Translation i can’t use woo-commerce!!

Hi Cecilia,

I said that because you said:

And, then you said:

I also posted this previously:

What did your host say?

I’d also like to add that would you mind trying setting up a free test site at https://pantheon.io/ and only install X, Cornerstone, WPML and WPML String Translation there is see if the issue persists. I would add the result to my report which would be valuable.

Thanks.

Hi Christian,

The host said that they aren’t blocking anything.

Hi Cecilia,

I can’t reproduce the issue related to WPML String Translation on my end. Though, have you tried deactivating the Advanced Custom Fields Multilingual plugin while WPML String Translation? Maybe the issue here is integration between the two and it’s only affecting the builder.

Thanks!

Morning Rad,

i have created a test page, https://lightflow.waxandgold.com/rad-test/, now if you go to Cornerstone and click on the flag to translate->copy from english, you will get that error.

Advanced Custom Fields Multilingual - is disabled.
WPML String Translation - enabled.

Thanks