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

Windows: Plugin check reports that readme.txt file is missing. Edit Link fails for other files. #434

Closed
bobbingwide opened this issue Mar 4, 2024 · 0 comments · Fixed by #449
Labels
[Type] Bug An existing feature is broken
Milestone

Comments

@bobbingwide
Copy link

When running plugin check in a Windows environment the plugin check doesn't find the readme.txt file.

It's probably a forward slash / backslash problem in trait Find_Readme()

In my example:

$plugin_relative_path is C:\apache\htdocs\wordpress/wp-content/plugins/field-block-for-acf-pro/
but the $files array has a backslash after the plugin name.

[160] => (string) "C:\apache\htdocs\wordpress/wp-content/plugins/field-block-for-acf-pro\README.md"
 [161] => (string) "C:\apache\htdocs\wordpress/wp-content/plugins/field-block-for-acf-pro\readme.txt"

See also #271

Scenario

  • Tools > Plugin Check
  • Choose any plugin
  • Categories: Plugin Report
  • Click on Check it!

The Warning no_plugin_readme with message "The plugin readme.txt does not exist".

The Edit Link works for this file.

Environment

Windows: 11
WordPress: 6.4.3
PHP: 8.3
plugin-check version: 1.0.1

Additional observations

The Edit Link doesn't work for the other messages. The path is incorrect.

https://s.b/wordpress/wp-admin/plugin-editor.php?plugin=field-block-for-acf-pro%2Ffield-block-for-acf-pro.php&file=field-block-for-acf-pro%2FC%3A%5Capache%5Chtdocs%5Cwordpress%2Fwp-content%2Fplugins%2Ffield-block-for-acf-pro%5Cphpunit.xml.dist

https://s.b/wordpress/wp-admin/plugin-editor.php?plugin=field-block-for-acf-pro%2Ffield-block-for-acf-pro.php&file=field-block-for-acf-pro%2FC%3A%5Capache%5Chtdocs%5Cwordpress%2Fwp-content%2Fplugins%2Ffield-block-for-acf-pro%5C.git

image

@swissspidy swissspidy added the [Type] Bug An existing feature is broken label Mar 4, 2024
@bordoni bordoni added this to the 1.1.0 milestone Mar 12, 2024
@swissspidy swissspidy modified the milestones: 1.1.0, 1.0.2 Jul 8, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
[Type] Bug An existing feature is broken
3 participants