CakePHP error handling misconfigured or could it be apache? - cakephp

I'm having a problem seeing some of my errors coming from CakePHP. I'm writing a component and after adding it in to $components of a controller I get a 500 error. Except that it's not helpful at all. All that is rendered is garbage. It looks like it's either zipped or an image. I'm seeing nothing but black diamonds with question marks, mixed with all sorts of characters.
Your help is appreciated. I'm running blind since I can't see what is wrong and don't know how to fix this.

Related

Trouble finding out why the page is rendering differently

I was trying to implement Sanity IO and was messing with a bunch of files and making new files and so on. Then poof my local host:3000 went from looking sleek and fancy to just having a white back ground. It almost looks like a web page from the 90s or something. Attached is my original background that is right and then after. I think I may have screwed up Tailwind some how but the files seem to be there. Anyways I was wondering if anyone would be able to tell just by the description and pic of this.
Before [1]: https://i.stack.imgur.com/ayc6Y.png
After [1]: https://i.stack.imgur.com/ti3k9.png

Problems with deployment

I keep coming across this issue on various deployment sites.
"Looks like you've followed a broken link or entered a URL that doesn't exist on this site."
I've searched through here so much that I figured I'd finally ask myself, since I never found a solution. Idk what I'm missing, and I'm happy to share screenshots if those will be any help. I just don't even know what to post/look for at this point
I tried many suggestions on here, and I was expecting some code that I was missing, or a step that I was missing. But I've been following suggestions and tutorials to a T and it's still not working, so I'm at a loss

Error message "Data Studio isn't available at the moment" for days

Some of our reports suddenly produce the following error message when trying to open them (from https://datastudio.google.com/)
We're sorry! Data Studio isn't available at the moment. Please try again later.
We are getting this message for more than 24h now. Any idea what the reason might be, and how to regain access to the reports?
While I still don't know what the root cause was, it's very likely something outside our sphere of influence. Looks like someone on Google's side pushed the wrong button, as it affected more users than just us (see, e.g., here and here).
So to fix this, have a look at the Google support forums, and then sit back, relax, and hope that Google is quick to do their thing.

Issue with DataContractSurrogate in the Debugger

Having big issues running my project locally. When I run it and get to this piece of code.
_institutionRepository.All();
when i step over this with debugger I get this inside the _institutionRepository object
Results View = The type 'Project1.Entities.DataAccess.Institution' exists in both 'Project1.Entities.DataAccess.dll' and 'DataContractSurrogates_40d75f07-afb1-4694-833a-ea508af1e0ac'
But when the rest of my team runs this locally they do not get this issue. I have been researching this for too long and need to get this resolved quickly. Any ideas would be appreciated.
i am running on VS2010 with silverlight and RiaSerivces
I am still not sure of this message. but we found the issue and it had nothing to do with the message received. One of our fields in the DB is supposed to be one of two types and we had the wrong one entered. So i am receiving data back. But this error/message is there with every entity in our solution. I would like to know more about it.

Is it possible to 'deport' an imported controller in CakePHP?

I'm running into a problem with GroupsController::build_acl()- http://book.cakephp.org/view/647/An-Automated-tool-for-creating-ACOs
It's taken me a while to track down the bug and now I've found it I'm not sure how to work around it.
Symptoms:
Not all methods for NodesController (defined by me) are returned.
Probable reason:
build_acl() imports a 3rd party plugin that also has a NodesController and a subsequent App::import() doesn't overwrite it.
I'm about to try two runs of the build, one with the plugin code commented out, but a more durable solution would be preferred!
I need a way to either drop an imported controller or force a re-import while remaining in scope.
you can not do what you want to do, think about straight php for a while. once you have used include('some/file.php'); how do you un-import it? you cant.
now the reason why you cant overwrite it is once again down to php. what happens if you run
<?php
include('some/file.php');
include('some/file.php');
?>
you will get errors about the class being defined already.
Cake is stopping this from happening, so the only (and correct way) is to not have 2 controllers with the same name. you can name them what ever you like and use the router to map to nice urls.
Turns out the plugin was redundant and not called anywhere in the application and would have broken it if it was as a class redefinition error would have ensued. After removal of the files everything worked okay.

Resources