Skip to content
This repository has been archived by the owner on Mar 17, 2022. It is now read-only.

Error Message: The plugin can not function correctly #35

Closed
sparlink opened this issue May 17, 2016 · 16 comments
Closed

Error Message: The plugin can not function correctly #35

sparlink opened this issue May 17, 2016 · 16 comments
Assignees
Labels

Comments

@sparlink
Copy link

I have both Polylang (Pro) and Woocommerse installed, but I keep getting an error message at the top of the admin screen: "The plugin can not function correctly , the plugin requires WooCommerce and Polylang plugins".
What is the problem? I tried reinstall Hyyan plugin, but it didn't work. I have been using WooCommerse for a few years now, so, reinstalling it is out of question.

At the same time, when creating a duplicate product in the second language, variable product does not work. Variable products become a regular simple product. Is that because the plugin is not working properly?

Thank you for your help!

@decarvalhoaa
Copy link
Contributor

decarvalhoaa commented May 17, 2016

Hello,

I'm not using Polylang Pro version and since it is a paid version I can't install it to test it. I'm using however the Polylang free version and don't have that issue.

Since Hyyan could not support his plugin, I have created a fork and manage to patch a couple of issues. Can I ask you whether you could install my version and see if it works? You can downloaded here https://github.com/decarvalhoaa/woo-poly-integration/archive/master.zip .

@decarvalhoaa
Copy link
Contributor

Hi again,

I just checked how this plugin checks if woocommerce and polylang are installed.

For polylang, is checking whether the file <install_dir>/wp-content/plugins/polylang/polylang.php is an active plugin. Can you check in the <install_dir>/wp-content/plugins/ folder how is polylang pro installed, i.e. is it still creating a directory called polylang with a file named the same way with .php extension?

@sparlink
Copy link
Author

I checked the plugin folder, and the folder name was polyland_pro, so I changed it to polylang.
After changing this, the plugin was activated!

However, when I tried to create a product in the second language, everything worked except for product variation. Does Polylang free version work better?

@decarvalhoaa
Copy link
Contributor

I don't recommend changing the folder name. this can create other type of problems with Polylang Pro itself and void support from the author. Instead is best to add the validation to Woo-Poly-Integration plugin in the Plugin.php file, here https://github.com/hyyan/woo-poly-integration/blob/master/src/Hyyan/WPI/Plugin.php#L88-L91

I don't think the issues with variations are caused by Polylang (either version) but rather some bugs in Woo-Poly-Integration plugin. I have manage to get it working for my needs.

I don't use custom attributes, i.e. attributes that you create in the add product page. I use global attribute, i.e. create the attribute in the Product -> Attribute, translate in both languages before creating the product in any of the languages.

I'm setting variations this ways and is works reasonably well. The issue is that the default variation is not synced. This means when you update the product on language A, product in language B will get the default unset. To overcome this, I unselected the plugin settings to lock the sync fields (top of my head, don't remember the name of the option) and set the default variation manually on each product just by hitting save variations (don't use update product).

When I have time, I will try to fix the variations issues but don't have a timeline for that yet.

@sparlink
Copy link
Author

Hi Antonio,

Thank you for the instructions. Your methods worked. It is a pain to
recreate all the variations/attributes for a few hundred existing products,
but I understand how to make it work now.
I hope you can find some time to fix the variations issues in the near
future - I assume there are a lot of people having similar issues.

Thanks a lot!
Meri

On Wed, May 18, 2016 at 6:40 PM, Antonio de Carvalho <
notifications@github.com> wrote:

I don't recommend changing the folder name. this can create other type of
problems with Polylang Pro itself and void support from the author. Instead
is best to add the validation to Woo-Poly-Integration plugin in the
Plugin.php file, here
https://github.com/hyyan/woo-poly-integration/blob/master/src/Hyyan/WPI/Plugin.php#L88-L91

I don't think the issues with variations are caused by Polylang (either
version) but rather some bugs in Woo-Poly-Integration plugin. I have manage
to get it working for my needs.

I don't use custom attributes, i.e. attributes that you create in the add
product page. I use global attribute, i.e. create the attribute in the
Product -> Attribute, translate in both languages before creating the
product in any of the languages.

I'm setting variations this ways and is works reasonably well. The issue
is that the default variation is not synced. This means when you update the
product on language A, product in language B will get the default unset. To
overcome this, I unselected the plugin settings to lock the sync fields
(top of my head, don't remember the name of the option) and set the default
variation manually on each product just by hitting save variations (don't
use update product).

When I have time, I will try to fix the variations issues but don't have a
timeline for that yet.


You are receiving this because you authored the thread.
Reply to this email directly or view it on GitHub
#35 (comment)

@hyyan hyyan added the bug label Jul 30, 2016
@hyyan hyyan self-assigned this Jul 30, 2016
@hyyan
Copy link
Owner

hyyan commented Jul 30, 2016

Fixed now

@hyyan hyyan closed this as completed Jul 30, 2016
hyyan added a commit that referenced this issue Jul 30, 2016
@pherdeco
Copy link

pherdeco commented Oct 3, 2016

I still had the issue with version 0.28, because the Polylang Pro plugin that i purchased and installed, is in folder "polylang-pro" and not "polylang_pro".
I used the same trick as decarvalhoaa and added this folder name in the Plugin.php file.

@decarvalhoaa
Copy link
Contributor

decarvalhoaa commented Oct 3, 2016

yep! thanks for reporting. I will create a patch for that and push it to a next release #68.

Can you confirm that this is the right path "polyland-pro/polylang.php" and not "polyland-pro/polylang-pro.php"? Much appreciated!

@pherdeco
Copy link

pherdeco commented Oct 4, 2016

yes this is correct in my installation (Polylang Pro Version 2.0.5)
$find . -name polylang.php
./wp-content/plugins/polylang-pro/polylang.php

@decarvalhoaa
Copy link
Contributor

thanks

@pherdeco
Copy link

Hello!
there is still a bug in the new version, you wrote "polyland-pro" and not "polylang-pro" as the folder name.

Cheers

@hyyan
Copy link
Owner

hyyan commented Nov 18, 2016

@pherdeco thank you for reporting , I will fix this again soon

@decarvalhoaa
Copy link
Contributor

I just check the master branch for release 0.29 and the polylang detection seems correct, i.e it is checking if plugin polylang-pro/polylang.php is activated. You can cehck it here:

https://github.com/hyyan/woo-poly-integration/blob/master/src/Hyyan/WPI/Plugin.php#L85-L91

@pherdeco - can you go to this file on your installation and check if you have something different? If not, can you try disabling and activating the Woo-Poly plugin?

@hyyan
Copy link
Owner

hyyan commented Nov 18, 2016

@decarvalhoaa there is a typo polyland instead of polylang

@decarvalhoaa
Copy link
Contributor

@hyyan you are right, and I'm going blind - was only looking for the "_" vs "-" (the original problem)

@hyyan
Copy link
Owner

hyyan commented Nov 18, 2016

@decarvalhoaa kein problem 😄

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

No branches or pull requests

4 participants