Due to the large volume of support requests, at the moment there is a waiting time of more than 24 hours. We apologize for the inconvenience this causes. We do not have any recurring unknown issues so we encourage you to please search the forum for other support topics that might be helpful and to review our documentation and look at our errata page for known issues. A supporter will respond to you as soon as possible.

This is the technical support forum for WPML - the multilingual WordPress plugin.

Everyone can read, but only WPML clients can post here. WPML team is replying on the forum 6 days per week, 22 hours per day.

You are not logged in. You can view support threads, but not post.
If you are already logged in, please refresh your browser.

This topic contains 12 replies, has 9 voices, and was last updated by  maddalenaF-2 3 years, 8 months ago. The support staff assigned to this topic is Amit.

Author Posts
Author Posts
November 21, 2013 at 11:52 am #295933

gijsW

Hi there,

I'm using the WPML plugin and the GEO Mashup plugin. I know that it is a common problem that the GEO Mashup plugin stops working when the WPML plugin is enabled. I only need the GEO Mashup plugin on one language version of the website and only on a single page.

Currently i'm getting this error:

Fatal error: Call to a member function is_attachment() on a non-object in ../wp-content/plugins/sitepress-multilingual-cms/sitepress.class.php on line 4015

Is there a workaround for this? For example removing all WPML plugin calls on one page only?

Thanks in advance!

November 21, 2013 at 2:05 pm #296011

Andrey
Forum moderator

Supporter languages: English (English ) Russian (Русский )

Supporter Timezone: Europe/Kiev (GMT+02:00)

Hi,

Thank you for contacting to us !

Could you provide us what WPML and WPML addons versions you are using ?

Thanks,
Abdrey

November 22, 2013 at 1:51 pm #296613

Andrey
Forum moderator

Supporter languages: English (English ) Russian (Русский )

Supporter Timezone: Europe/Kiev (GMT+02:00)

Hi,

Do you use any code to remove WPML function ?

Thanks,
Andrey

November 26, 2013 at 8:05 am #297943

gijsW

Hi,

I haven't used any code to remove WPML function. I was wondering if it was possible to deny all WPML scripts on one single page. Because the GEO Mashup Plugin works without WPML. Do you know if that is possible to do so?

November 26, 2013 at 10:41 am #298060

Amit
Forum moderator

Hi,

Andrey is away for a few days and have asked me to take over here, hope that's fine.

Thant's a very interesting question.

I am not 100% sure, but maybe you can try this - http://stackoverflow.com/questions/6774424/wordpress-disable-plugin-on-specific-pages-posts

Or this - hidden link

If one of these works please let me know.

Thanks!

November 27, 2013 at 1:39 pm #298819

mattC-2

We've got the same problem, though need maps and WPML both working on the same pages so disabling one or the other on certain pages is not an option. I saw on another thread that you were looking to work with Geo Mashup developers to find a solution. Any idea how long that's likely to take?

Or can you recommend another mapping plugin that can replace Geo Mashup and does work with WPML? We have geolocated posts and need to display their locations on maps at the top of category pages and search pages and on single post pages - pretty standard stuff, but the sites are multilingual.

November 28, 2013 at 10:20 am #299233

Benjamin

Hi,

my solution to solve this problem.

Edit sitepress.class.php.

Remove $query->is_attachment() at lines 4014 and 4124.

Now it's working for me.

Hope it helps.

November 28, 2013 at 4:20 pm #299493

gijsW

Thanks Benjamin! Your solution worked for me.

@mattC-2 I also tried WordPress store locator, this worked for me.. but this plugin doesn't have a search widget and therefore I needed Geo Mashup to work for me.

Thanks to all for your help!

November 29, 2013 at 3:14 pm #300053

mattC-2

Hi Benjamin

Thanks, just seen your reply. I put in an || !is_object($query) into those two lines and that works too.

December 10, 2013 at 9:48 am #304865

marcoL-2

Can you add that to the next release?

January 14, 2014 at 2:32 pm #321061

Kathryn

Chiming in here because Benjamin's solution didn't work for me. Does anyone else have any ideas?

Editing to add: Just want to mention that the map works fine in the site's primary language (English, in this case), but doesn't work on the other two languages. I get this error:

 Fatal error: Call to a member function is_attachment() on a non-object in /home/caritas/public_html/wp-content/plugins/sitepress-multilingual-cms/sitepress.class.php on line 4014
January 23, 2014 at 8:47 am #326277

Hanna

Thanks Benjamin! It worked for me!

May 18, 2014 at 9:06 pm #402488

maddalenaF-2

Hi,
I was not happy with deleting the line as Bemjamin suggest, as I need to maintain the patch after actualization. So I worked on another solution creating new classes for
SitePress -> WMPL
GeoMashup -> Geomashup
GeoMashupDB -> Geomashup

You can find the whole code here ( in spanish with english commented code)

hidden link

You are not logged in. You can view support threads, but not post.
If you are already logged in, please refresh your browser.