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

WordPress plugin repo contains .ignore files #75

Closed
matijamrkaic opened this issue Nov 22, 2014 · 11 comments
Closed

WordPress plugin repo contains .ignore files #75

matijamrkaic opened this issue Nov 22, 2014 · 11 comments

Comments

@matijamrkaic
Copy link

Hi there!

Plugin .zip on WordPress repo contains .gitignore and .svnignore files in its root.
This can lead to some problems with pushing whole site repositories to production. Like this:

PHP Fatal error:  require(): Failed opening required 
'/app-root/data/plugins/wp-less/lib/../vendor/leafo/lessphp/lessc.inc.php'
​ ​... ​  in /app-root/data/plugins/wp-less/lib/Plugin.class.php on line 48​

It might be a good idea to remove them, if that is possible, to skip rare but unnecessary problems.

Cheers!

@thom4parisot
Copy link
Owner

Hello @matijamrkaic, how do you relate that .gitignore is the cause of this PHP include error?

@matijamrkaic
Copy link
Author

.gitignore file contains /vendor/.
When locally developed site is pushed to production with git, it ignores the plugins/wp-less/vendor.
That folder never gets to the production, thus the require() of /wp-less/lib/../vendor/leafo/lessphp/lessc.inc.php fails.

Does this make sense?

@thom4parisot
Copy link
Owner

Oh yes I see now. vendor is not meant to be versioned though.

Do you use composer?
If so simply do a composer install to pull your dependencies, and version only the composer.json file.
You can register the dependency on wp-less plugin by executing composer require oncletom/wp-less:~1.7.0.

@matijamrkaic
Copy link
Author

I will try that out!

@thom4parisot
Copy link
Owner

Cool. Let me know if more informations are needed. Because it could be useful for #66.

@tordans
Copy link

tordans commented Nov 25, 2014

@matijamrkaic did you find a solution for this? What is your current workflow?
I have a similar issue at #76.
Thanks

@matijamrkaic
Copy link
Author

Hi @tordans,
After adding the plugin to wp-content/plugins, I simply removed the .ignore files from wp-less folder.

Cheers!

@tordans
Copy link

tordans commented Nov 25, 2014

Hi @matijamrkaic but that means you have to do it for each update again, right?
Also: Did you use the wp-admin-plugins page to start the update process or did you download it manually? I used the wp-admin-plugins page (and removed the .ignores afterwards) – which did not work.

Also I tried extending my own .gitignore with wp-content/plugins/**/.gitignore but still got the problem.

I will try downloading the zip and modifying it before adding the content next.

@matijamrkaic
Copy link
Author

@tordans,
After each wp-less update, true. But it's not like it's updated daily. Actually I've updated it only once in the past 6 months. And yes, manually.
I always update things on dev repo (, remove .ignore files), and then just push to production.

Also I tried extending my own .gitignore with wp-content/plugins/**/.gitignore but still got the problem.

That is very clever idea. Too bad it fails.

@thom4parisot
Copy link
Owner

Could you share your deploy script (the relevant bit on how you deploy the plugin)? So as I can understand how you guys are doing it?

Thanks :-)

@thom4parisot
Copy link
Owner

Have a look to #66 (comment) for hints to install the project without running into the .gitignore issue.

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