Welcome to the Treehouse Community

Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.

Looking to learn something new?

Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.

Start your free trial

PHP Using the GitHub API with PHP Creating a GitHub Client GET Search and Results

Jonathan Grieve
MOD
Jonathan Grieve
Treehouse Moderator 91,252 Points

No CSS and PHP found on project

Hi all,

Has anyone else had any problems loading the CSS and some files from Bootstrap and Twig? My project downloads don't seem to be working on localhost, and although the search functionality isn't working I am getting a query string in the URL.

I know the obvious answer is to try again in Workspaces but I wanted to see if this could be fixed on localhost :) Thanks

2 Answers

Dennis Ek
Dennis Ek
2,800 Points

I finally got his working. When you've downloaded the project files you need to go to templates/base.html There you need to fix all the link/script links to relative links, So f x;

<link href="/vendor/twbs/bootstrap/dist/css/bootstrap.min.css" rel="stylesheet">

should be

<link href="./vendor/twbs/bootstrap/dist/css/bootstrap.min.css" rel="stylesheet">

if you do the same to all of them the page looks like in the video.

Sry for late reply :P

Justin Radcliffe
Justin Radcliffe
18,987 Points

So far I haven't had any CSS problems, but I did encounter the same search functionality problem in addition to broken navigation links. I solved the navigation problems by adding the .php file extension to the links in the base.html file. I solved the search functionality problem by adding the .php file extension to the search form action in the form_search.html file.

Jonathan Grieve
Jonathan Grieve
Treehouse Moderator 91,252 Points

Thanks Justin, I have to admit, although I did complete the course I didn't get to the bottom of all the issues going on, so I'll have to add it to the list of courses I have to redo. Probably if it gets added to a new PHP Track! :-)