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

Fixing local path #328

Closed
wants to merge 0 commits into from
Closed

Fixing local path #328

wants to merge 0 commits into from

Conversation

karrirasinmaki
Copy link

This pull request will fix local paths given by function beans_url_to_path(string) on some environments.

The problem arose, fixed and tested on this WP Vagrant box (ubuntu/xenial64):
https://github.com/Seravo/wordpress

The tested environment has slightly different file structure than normal WP installation.

@karrirasinmaki karrirasinmaki mentioned this pull request Aug 27, 2018
@christophherr
Copy link
Member

Hey @karrirasinmaki,

thanks for the updated PR.
Can you please target it against development and not master?

This is still breaking our tests.

There were 2 failures:

1) Beans\Framework\Tests\Unit\API\Utilities\Tests_BeansUrlToPath::test_should_bail_out_when_external_url
Failed asserting that two strings are identical.
--- Expected
+++ Actual
@@ @@
-ftp://foo.com
+./ftp:/foo.com

C:\laragon\www\beans\wp-content\themes\Beans\tests\phpunit\unit\api\utilities\beansUrlToPath.php:53

2) Beans\Framework\Tests\Unit\API\Utilities\Tests_BeansUrlToPath::test_should_bail_out_when_external_url_with_internal_pathFailed asserting that two strings are identical.
--- Expected
+++ Actual
@@ @@
-http://example.com/cool-stuff-at-www.getbeans.io
+./http:/example.com/cool-stuff-at-www.getbeans.io

C:\laragon\www\beans\wp-content\themes\Beans\tests\phpunit\unit\api\utilities\beansUrlToPath.php:83

@christophherr
Copy link
Member

Hey @karrirasinmaki,
We are trying a different approach.
Could you please check if #334 solves the problem for you?

@karrirasinmaki
Copy link
Author

Hey,

unfortunately this that won't fix the problem. I still got this error message:

Warning: include(/wp-content/themes/um-child/index.php): failed to open stream: No such file or directory in /data/wordpress/htdocs/wp-content/themes/um-child/page.php on line 2

Based on the discussion on #332 (beans_url_to_path() handling this issue no good) I would say let's try to tackle that issue in PR #334.

@christophherr
Copy link
Member

Hey @karrirasinmaki
I think you have to give us more detail or context on what the problem is and what you are trying to achieve and what you expect Beans to do for you because it looks like all you have to do is to correct the path in your include statement.
334 is not going to fix that.

@karrirasinmaki
Copy link
Author

Hey,

I finally got more time to test this issue and PR #334. Seems like that PR solved the problem after all!

1 similar comment
@karrirasinmaki
Copy link
Author

Hey,

I finally got more time to test this issue and PR #334. Seems like that PR solved the problem after all!

@karrirasinmaki
Copy link
Author

Hey,

I finally got more time to test this issue and PR #334. Seems like that PR solved the problem after all!

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

Successfully merging this pull request may close these issues.

2 participants