CakePHP 3.2: DebugKit error when opening panel - debugging

When I try to open any panel in DebugKit, CakePHP logo just keeps spinning and I can see there is an error in console. This is the error that I get :
Call to undefined method App\Controller\Component\MyComponent::configKey()
Which is strange because this component works totally fine and it doesn't show any errors when I use it in the application.

I figured out what was causing the error. My components name was Cookie and DebugKit plugin uses component with this name as well, so plugin was trying to call function configKey, which of course could not be found in my component.

Related

Wordpress gutenberg custom block — issues with preview loading

I created a plugin with custom blocks. I am have trouble with the block preview. When I set the block on preview mode and reload the page editor — I get a error message on all the blocks I've preview Error loading block: You are probably offline.
In the console I am also getting the following errors:
pd-admin.js?ver=2.20:12 Uncaught TypeError: jQuery(...).live is not a function
Failed to load resource: net::ERR_CONNECTION_CLOSED
wp-auth-check.min.js?ver=5.5:2 Uncaught TypeError: Cannot read property 'hasClass' of undefined
Any ideas what I am doing to cause this?
I find issue with the RichText field — if the RichText is too long I can't preview the block at all and in the block I get the same error message saying Error loading block: You are probably offline.
To fix console error : WordPress 5.5 stopped using jQuery migrate. This change has been causing problems with old plugins and themes. If you are noticing issues after upgrading to WordPress 5.5, installing this plugin might fix it: https://wordpress.org/plugins/enable-jquery-migrate-helper/
For RichText long text error, you need to increase LimitRequestLine in your apache configuration. Ref : how to increase Apache 2 uri length limit

"~" symbol created automatically after running project with service worker

My project is a simple login page. I am using asp.net core with MVC.
Everything was working well and I wanted to add service worker to my project. I followed the known steps. Add a manifest.json file in wwwroot, fill it correctly and add this function services.AddProgressiveWebApp(); after services.AddMvc().SetCompatibilityVersion(CompatibilityVersion.Version_2_1);.
When others do these steps, service worker works properly. When I run it (IIS Express), service worker produces an error: "Uncaught (in promise) TypeError: Failed to register a ServiceWorker: A bad HTTP response code (404) was received when fetching the script."
Then I realized this thing: https://localhost:44331/~/serviceworker.
The ~ symbol is created automatically and I am not knowing how to remove it.
The following https://localhost:44331/serviceworker works.
Help?
It is solved.
I updated the version from v1.0.42 to v.1.0.33 and it worked.
v1.0.42 has a bug.

Custom error handling

I am developing a component in joomla 2.5, my component sends a request to some url and gets the response object. If i pass wrong url, joomla takes me to the default page of Error : 500 - No response code found . I want that if user install my component and mistakenly they put wrong url , it should show some custom error message/page which should more meaningful to non-programming person rather than taking user to default error page. Is there some way to add this type of functionality in Joomla without editing template/error.php file in core.
You should have an error.php file in your template, if you don't add one and make it look the way you want. also remember that when you turn debugging off you won't get the stack trace etc.
However error 500 indicates something different than that the url does not exist ("wrong URL"), which would be a 404. 500 is an internal server error and you need to check your logs to figure out what is causing it.

Error Displaying Error page:Application installation Error in joomla 3.0

I am facing the problem in Joomla Component. I have attached the Screen in which I am facing the error.
I have made my own component for show time. When I add show using my component it works fine.Everything goes right but sometime I am getting this error.
When my client see this error, he gets hyper.
but do not know why this error comes.
Is there any solution?
Please help me guys.
Here is the screen shot of Error.
Thanks in advance.
Looking that screen, I suppose the error is on the instance of the controller (that call the particular action) ... check if is it istantiate proprely. Also check the action calling... I suppose that is here the error..

My website is throwing "PHP Fatal error: Call to undefined method CI_Lang::lang()"

I created a website using CodeIgniter Framework 2.1.0 that was originally working well. Yesterday, I integrated this i18n code into the site for multi-language support.
Now, when I upload my site to cpanel and open it, I get this error in my log file:
[21-Nov-2011 10:19:04] PHP Fatal error: Call to undefined method CI_Lang::lang() in XXXX
However, the website is working well on my localhost server (xampp for Windows). What's wrong?
See the thread attached to the library: http://web.archive.org/web/20120112092127/http://codeigniter.com/forums/viewthread/179036. In the first post is attached a modified library that claims to alleviate the buggyness of the original.
There is also a post on the first page there referencing an error similar to yours:
After copying the files as described in the article I get the
following error: Fatal error: Call to undefined method
CI_Lang::CI_Lang() in
/www/websites/audio-machinery/application/core/MY_Lang.php on line 32
Though he seems to be calling CI_Lang, not Lang. His solution appears to have been to use the code attached to the forum thread.
Also, cpanel is a control panel for hosting, not a hosting provider. But your hosting provider may be causing issues (e.g. if using older versions of PHP which do not work with newer version of CI. Often hosting providers will give you the ability to choose which version of PHP you are using--usually found in cPanel).
have you uploaded ALL the new files to your live server? that error implies that the code is not found or available to the script.
I came accross the same problem.... it was working fine on localhost but when loaded on live server it gives me undefined error... the problem appears becuase I created file with name My_Lang.php and My_Config.php as on live server it is case sensitive.... so I changed it to MY_Config.php and MY_Lang.php .... it works fine now.... Hope it will work for you too

Resources