My Symfony debug toolbar (v1.3.7) is appearing correctly but clicking it generates a javascript error.
Looking through the source code, I can see that the javascript for the toolbar is not being sent back to the browser. I have another project set up on the same machine which uses Symfony v1.4 and this works fine.
This project is also set up on one of my colleages' machines and it is working fine. The project itself is also running without problems.
Any ideas what might be causing this issue?
You probably didn't correctly link the assets in your web root.
You need to copy/symlink/... /path/to/symfony/data/web/sf to /path/to/project/web/sf
Related
I've been developing a website built on OctoberCMS, using the Laravel Homestead vagrant box as my local development server and have so far been getting along swimmingly. I developed most of a theme this way.
However I've recently started running into a problem wherein requests for assets/vendor.css in the theme assets succeed but receive a text/html response containing HTML for the homepage instead of the proper CSS.
This means vendor CSS for the page doesn't load. However if you repeat the request for vendor.css with "open in new tab" after page load the correct asset is returned, and the Chrome 'sources' tab also shows the correct asset.
This strange behaviour seems to extend to JS assets. I'm currently looking at a request for assets/vendor/jquery.js where the inital response actually contains the contents of assets/theme.css - and this is causing JS errors in the console.
In this case however if I make the request to that URL again I actually still receive the same incorrect CSS, but once again the Chrome 'sources' tab actually shows the correct asset.
Inspecting the files in my code editor I see the correct assets under the correct filenames and locations.
It seems I might have an issue with Homestead's web server. However I'm confused about where it might have come from as I haven't reconfigured anything and this has been working fine previously.
I've confirmed that the problem still persists even after deleting the homestead VM, and then building a brand new one and installing a fresh copy of OctoberCMS, without importing any of my own custom theme files.
I tried having a look into the nginx logs on the VM to see if I could spot anything odd, but it looks like they all have no content, 0 lines.
I'm a bit stumped and haven't found much helpful searching around.
Any suggestions? Help much appreciated.
So I've managed to re-build my project in such a way that this time I didn't reproduce the problem.
I'm pretty sure that ultimately it was caused by the fact that I relocated the homestead VM (and projects therein) by renaming its containing folder.
In previous attempts I had been deleting the VM by running vagrant destroy and then re-creating it by running vagrant up.
Once I completely deleted the homestead repository and re-cloned it from scratch from laravel/homstead on github, then proceeeded to vagrant up and set up OctoberCMS, I no longer experienced the issue.
I suspect perhaps the original path to my VM (before rename) was still in a configuration file somewhere in the laravel/homestead project and the disconnect between this value and the actual filepath was causing the problem.
I am building a module for SilverStripe. I am simply extending LeftAndMain.php and showing a template by placing the template file at templates/module/namespace/MyClass_Content.ss
It is working like a charm locally and I can see all the changes I am making to MyClass_Content.ss in my browser. But when I host it on my server, everything else works fine, I can see my navigation item too, but on right side, where content is supposed to be rendered, empty space.
Just to poke around, I navigated into the vendor folder locally and on the server, and I edited the MyClass_Content.ss file by placing a HELLOWORLD on the starting of the file. Locally, I can see the HELLOWORLD disrupting the whole view and the breadcrumbs, but on the server, no change, empty right side.
There are no error logs for nginx or php. The error logs in the console don't seem to be important since I see the same on both local and server. Even the JS and CSS is loading on the server, the only difference in the network panel is the images won't load on the server, which makes sense since the template won't load.
How do I debug this? Any ideas?
Update: Actually, it was the namespace. Namespace was Silverstripe but the template path was SilverStripe. Locally worked due to case-insensitive environment, but failed on prod due to a case-sensitive environment.
I just checked your repo - move your templates directory up to sit next to src instead of inside it. :)
Yesterday my Web Profiler stopped working, in Symfony v.3.0.9 (on Win, with WAMP, PHP v7.0.4). Before that it worked just fine and I'm not sure exactly what happened when it stopped.
I first checked the JS errors being reported, then possible errors in dev.log, then tried clearing the cache (with cache:clear), also as an admin and also manually in file system. Nothing helped.
There are no errors returned anywhere and there are no tries from client side to even call it with AJAX. I tried restarting Apache, Wamp & Windows.
Then, I tried composer update, which naturally brought up some new, unrelated issues, and eventually I ended up installing Symfony 3.1, but still no sign of Profiler.
My HTML page does have a body, so the solution here: Web Profiler not showing up in dev doesn't help me. All other mentions of this problem usually lead to some compiling issue, which I don't have (or didn't find it yet).
I also made sure I am running in dev mode, by putting breakpoints in app_dev.php directly.
Has anyone any other/new idea what could be going on?
Addition: I also tried updating Symfony to 3.2, without Profiler appearing.
Addition #2: Just wanted to share, that the only way I can get my Web Profiler to show is, after the cache is rebuilt, go into the var/cache/dev/appDevDebugProjectContainer.php, into the getProfilerService() function and manually comment out the line with:
$instance->disable();
Ugly as hell, but I haven't find any other solution until now. At least, now I see that somehow Symfony decides, based on some internal logic, to actually not show the profiler. At least there is some logic at works.
The final answer to my "mysterious" issue was that someone in the team changed the profiler's setting in the config_dev.yml, and set the:
framework:
profiler:
collect: false
Getting that back to collect:true (which is also its default value) made it all work.
I am working in an web application and I got access to the files of the project. I am trying to run in local.
I've downloaded all the source code and the vendor libraries. Then I tried to run the project by the console.
It seems to work fine, but when I try to open the page in my browser it is just white.
I don't even know how to start looking for an error. How can we look for bugs or errors in this case?
Any idea on this? I am currently using Laravel 4.2.
We have an existing web application already running in live. Something needs to be changed so I downloaded all the files from live server to my localhost via ftp and do the update in there. Everything is working fine in localhost but when I tried to upload(ftp) the select files (that were only updated- a blade file, a controller and a model), and and test the live site, the changes aren't showing. Checked the html elements thru browser dev tools and indeed it's just the old version. The id that I newly added in the div isn't there.
I checked in the filemanager if the files were successfully updated and it's there.
I am done doing the following:
cleared my browser cache, cleared files in /app/storage/views. What else to do?
Is updating the files thru FTP for laravel not good? Honestly I am just a newbie to this framework so your explicit explanation would be appreciated. Thanks!
Laravel compiles all files before they are deployed most times. If the files are not recompiled on the server, then it's gonna keep running the old setup. if you have terminaal access, runningphp artisan clear-compiled may fix your problem. I may be wrong but this is what i see from where i'm sitting.