stephenharris / WordPress-Post-Type-Archive-Links

Adds a metabox on Appearance > Menus to create menu items pointing to post type archives
55 stars 25 forks source link

Warning being generated from line 219 | post-type-archive-links.php #29

Closed ghost closed 10 years ago

ghost commented 10 years ago

I'm getting the following warning being shown in WP Dash > Appearance > Menus. Looks like the script is looking for a MIN version of the JS file and one is not provided.

 Warning: filemtime() [<a href='function.filemtime'>function.filemtime</a>]: stat failed for
F:\...\plugins\posttype-menu-links/metabox.min.js in
F:\...\plugins\posttype-menu-links\post-type-archive-links.php on line 219
ghost commented 10 years ago

I see you also add an ingnore for min files. this has resulted in the min js file required by the php file to be excluded on your commit https://github.com/stephenharris/WordPress-Post-Type-Archive-Links/commit/3b6162d77aeb1305322ed26d233e1d557d70b6da

ghost commented 10 years ago

manually created the min file, error is now gone...adjust your gitignore so you only exclude certain .min.js files

stephenharris commented 10 years ago

Hi @Buretta - I take it you've download the plug-in from Github as opposed to WordPress.org?

I've not made it at all obvious, but this is a development repo, and needs tasks run on in it to build it's distribution state. This includes, among other things, mini-fying the javascript file. The build is done via Grunt and there is a package.json and Gruntfile present in the repo. Otherwise, feel free to use the version on .org.

This is a recent change, so apologies if you've been quite happily using the Github repo as your source for the plug-in.

ghost commented 10 years ago

yes, I use the git repo to manage version control for most of my installed wp plugins as well as pull in ones quickly to future projects.

didn't think of looking at the grunt file since I didn't think it was a dev repo and haven't run into any errors before so never looked at the change you've made to the setup.

is there a prod repo of this on git?

ghost commented 10 years ago

why don't you go to a private repo for staging and deploy prod here? just curious...

stephenharris commented 10 years ago

why don't you go to a private repo for staging and deploy prod here?

The Github repo was only ever for convenience of collaboration, but since the plug-in has always been so small there was no 'build' routine required, hence it also worked on a live site.

This changed with the last update, when the javascript file was finally minified as part of the build routine. The .min.js file is not version controlled, so not present when you checkout the repo.

There is no production repo unless you count WordPress' SVN. Or the git mirror of it: https://github.com/wp-plugins/post-type-archive-links. That's not really version control: each commit is a new version, because that's what .org's (implicit) rules are.

You can also use composer if this by version control you just mean you want to be able to pull in particular versions of plug-ins to a project.

ghost commented 10 years ago

haven't gotten composer setup for this particular project, but ur right I should be managing my dependencies with composer instead of a git repo...bad habits remain sometimes ;)

thanks for the detailed answer