You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Feb 7, 2023. It is now read-only.
Repository navigation
This repository was archived by the owner on Feb 7, 2023. It is now read-only.
/styleguide/html/styleguide.html 404 for some files #2
I'm assuming this has something to do with how I'm handling the results returned from the RecursiveDirectoryIterator() and RecursiveIteratorIterator() calls on line #41 of builder/lib/generator.lib.php. Can you do me a favor and do a print($name."\n"); exit; on line #43 of that file? Then copy and paste at least some of the results here. I don't have access to a Windows machine to test this. Fixing this should fix what I suspect is a similar problem in watcher.lib.php.
Thanks, @benedfit . I'll try to borrow a Windows machine here.
Have a couple of ideas for this. I'm going to create a branch for this and post it. I'm also going to get a VM set-up on Tuesday so I can test this myself. builder.inc.php uses glob() for iterating over directories. This seems cross-platform so the initial patterns and what not are created. generator.inc.php and watcher.inc.php use the more powerful RecursiveDirectoryIterator() but it seems to want some more configuration. This is why other files like images and JS are not getting copied. I think the latter has some flags (related to 'dot' files and paths) that I should be able to set to make all of our lives easier.
I've updated watcher.lib.php in the branch diriterator-fix. Fingers crossed that that works as well. Basically, start the watch, make file changes, and see if they show up in public/.
I believe this is now fixed. I used PHP 5.3 from php.net on the Win 7 VM to test. I've merged the changes into master. Let me know if anything still seems broken.
Note: if you update your copy make sure to a) generate your site again and b) to double-check you've properly refreshed:
Activity
benedfit commentedon Aug 29, 2013
Would appear that the static assets aren't being copied from source to public. Maybe a Windows issue?
benedfit commentedon Aug 29, 2013
Note than I ran the builder command from the command line and /public/index.html generated successfully, and does so on subsequent builds
dmolsen commentedon Aug 30, 2013
I'm assuming this has something to do with how I'm handling the results returned from the
RecursiveDirectoryIterator()andRecursiveIteratorIterator()calls on line #41 ofbuilder/lib/generator.lib.php. Can you do me a favor and do aprint($name."\n"); exit;on line #43 of that file? Then copy and paste at least some of the results here. I don't have access to a Windows machine to test this. Fixing this should fix what I suspect is a similar problem inwatcher.lib.php.Thanks, @benedfit . I'll try to borrow a Windows machine here.
bmuenzenmeyer commentedon Aug 31, 2013
I see the same thing on Windows. I also had to set error_reporting on and define my APP_PATH and include it in the include path. PHP 101, perhaps.
I will look at the error @benedfit mentions and report findings.
bmuenzenmeyer commentedon Aug 31, 2013
Probably related....
Running the builder provides the following error for (what I think is) every pattern:
Line #53:
bmuenzenmeyer commentedon Aug 31, 2013
@dmolsen I did what you asked @benedfit above, I get the following results:
Hope this helps. Will look at this all later - have a crying son so bye!
dmolsen commentedon Aug 31, 2013
Have a couple of ideas for this. I'm going to create a branch for this and post it. I'm also going to get a VM set-up on Tuesday so I can test this myself.
builder.inc.phpusesglob()for iterating over directories. This seems cross-platform so the initial patterns and what not are created.generator.inc.phpandwatcher.inc.phpuse the more powerfulRecursiveDirectoryIterator()but it seems to want some more configuration. This is why other files like images and JS are not getting copied. I think the latter has some flags (related to 'dot' files and paths) that I should be able to set to make all of our lives easier.dmolsen commentedon Aug 31, 2013
Added a branch called
diriterator-fix. I hope it'll address this issue for you. I only attempted to fixgenerator.lib.php. The two commits:support for SKIP_DOTS
support for win directory separator
I appreciate your help.
bmuenzenmeyer commentedon Sep 1, 2013
Hi Dave.
This appears to have done the trick. style.css and the other assets are now found when generated.
dmolsen commentedon Sep 1, 2013
I've updated
watcher.lib.phpin the branchdiriterator-fix. Fingers crossed that that works as well. Basically, start the watch, make file changes, and see if they show up inpublic/.dmolsen commentedon Sep 4, 2013
Finally got a Windows 7 VM. Going to give this a run out tonight.
dmolsen commentedon Sep 5, 2013
I believe this is now fixed. I used PHP 5.3 from php.net on the Win 7 VM to test. I've merged the changes into
master. Let me know if anything still seems broken.Note: if you update your copy make sure to a) generate your site again and b) to double-check you've properly refreshed:
I ran into cache issues when testing.
bmuenzenmeyer commentedon Sep 5, 2013
Looks good to me 👍