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

Need to update Update Manager client file #257

Closed
1 of 3 tasks
ghost opened this issue Aug 30, 2020 · 6 comments
Closed
1 of 3 tasks

Need to update Update Manager client file #257

ghost opened this issue Aug 30, 2020 · 6 comments

Comments

@ghost
Copy link

ghost commented Aug 30, 2020

Describe the bug
We are using an old version of the Update manager client file. This means if there is another plugin installed also using the update manager then their header image will override ours.

To Reproduce
Steps to reproduce the behavior:

  1. Install a zigpress plugin and activate
  2. Click on 'view details' of our plugin
  3. See zigpress header
  4. Deactivate zigpress plugin and recheck header

Screenshots

Zigpress activated:

zig

When Zigpress deactivated:

cc-correct

Expected behavior
Our header should stay there!

Isolating the problem (mark completed items with an [x]):

  • I have deactivated other plugins and confirmed this bug occurs when only Classic Commerce plugin is active.
  • This bug happens with a default ClassicPress theme active.
  • I can reproduce this bug consistently using the steps above.
@johnalarcon
Copy link

Related discussion at https://forums.classicpress.net/t/possible-conflict-with-update-manager-images/2466/13

@timbocode
Copy link
Contributor

Yeah, I don't think this is an issue with Update Manager. Classic SEO and Classic Commerce don't have this problem and both use Update Manager . Not sure there's anything for us to do here but I'll leave this open for the time being.

@ghost
Copy link
Author

ghost commented Aug 30, 2020

I agree. But we should keep it in the pipeline, so issue should remain open. If John releases a fix that involves changing the client file then we will certainly need to be updating to that version.

@johnalarcon
Copy link

After reviewing the issue, I'm in agreement with you both that it's not necessarily an issue with the Update Manager plugin code. In this case, I think it's a documentation issue. Andy (zigpress) implemented the image path filter in accordance with the example provided, which is what caused the issue. The solution will be to update the docs to reflect the same change Andy made to his plugin's implementation of the filter. So, from this...

function my_custom_image_path($path) {
	return '/path/to/your-site/wp-content/plugins/your-plugin-name/images';
}
add_filter('codepotent_update_manager_image_path', 'my_custom_image_path');

...to this...

function my_custom_image_path($path) {
	if (strpos($path, {plugin-slug}) !== false) {
		$path = '/path/to/your-site/wp-content/plugins/your-plugin-name/images';
	}
	return $path;
}
add_filter('codepotent_update_manager_image_path', 'my_custom_image_path');

I will get the docs updated quickly.

@timbocode
Copy link
Contributor

Thanks John. Thanks makes sense. I'll close this issue now.

@ClassyBot
Copy link

This issue has been mentioned on ClassicPress Forums. There might be relevant details there:

https://forums.classicpress.net/t/possible-conflict-with-update-manager-images/2466/29

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

No branches or pull requests

3 participants