Zend PHPUnit var_dump not working in controllers - zend-framework

I just ran into an unusual problem:
While testing controllers in Zend using PHPUnit, all of a sudden all occurrences of var_dump() placed in Controllers stopped working. In models and test-classes, they still show up, and when I navigate to the specified controller with a browser, all var_dumps are executed.
I'm completely at a loss here, does anyone know how I can fix this?
Thanks in advance.

I think the problem is, that the output is buffered.
You could do this in your Controller:
error_log(print_r($var, true)); // instead of var_dump
or this in your test case:
$return = $this->getFrontController()->getResponse()->getBody();
var_dump($return);

Or you can try my "extended debug" class and use dd($something); ;)
https://github.com/tomasfejfar/enhanced-dump/blob/master/fnc.php

Related

Ionic app sidemenus don't work after closing $ionicPopup

The Ionic app I'm working on displays a $ionicPopup when it starts and after closing the popup, the two sidemenus the app contains don't work at all. If I remove the popup from the code, the sidemenus work well.
Does anyone have an idea what the problem could be?
Add the following code to the controller that contains the slidebox:
$scope.$on('$ionicView.enter', function(){
$ionicSlideBoxDelegate.update();
})
I had the same problem than you. I resolved with this.
Solution
I was facing this same problem.
In my case, this was happening because, the enable-menu-with-back-views="true" option in ion-side-menu was set false.
It got back to work when setting it to true. =)

Unable to get reset form using button in mvc form

I'm trying to use MVC structure while building a sencha touch 2.3.1 app.
I have a form, and two buttons one for submission and other for resetting it.
I have added form view code in file app/view/form1.js,
controller code to app.controller.form1 and
here's my app.js.
Can someone point out where I am wrong, and to a source where I can get a better understanding of how to use (I know what MVC is) MVC structure in Sencha. There documentation is a bit to simplified to include all this.
Thanks in advance.
Your Problem is the getting of the form:
form1.reset();
You can get it with the auto generated getter method in the controller:
var form1 = this.getForm1();
And remove your double colon "::"

Too much recursion with swfupload

I am facing a too much recursion error when using swfupload in IE9. It works for the first time i load the object, but once I navigate to a different part of the site and come back to the upload page, these kinds of calls start occuring:
out of stack space - swfupload.speed.js Line 72:
return this.speedSettings.user_file_queued_handler.call(this, file);
I never unload the swfupload(flash) component specfically from the webapp.
What is going wrong?
Flash object does behave funkily when it is instatiated but not available/hidden on the page.
(see: SWFUpload startUpload() fails if not called within the file_dialog_complete_handler)
So I ended up re-instantiating the object when coming back to the view containing it. Seems to solve the problem.

JToolBarHelper won't work on IE8 and IE9 Browsers?

I'm working on joomla 1.5 and I have this form and it has a Save and Close button but it is not working on IE browsers. The conflict on MooTools.js and jQuery.js is resolved but still the buttons don't work. What is the possible cause of this?
Thanks,
Justin
Steps to trace the bug.
1. form name should be "adminForm"
all hidden variable present in the form like option, task, view, controller. whatever you are using in your component.

UISearchBar error when entering Searchbar textbox

I have found a strange error. I have been following this sample:
http://jduff.github.com/2010/03/09/throwing-a-uinavigationcontroller-uitabbarcontroller-and-uisearchbar-together/
I tested it and then tried to roll it in my app. It worked in the sample but not my app. In my app I would SIGABRT or BAD_ACCESS errors whenever I entered the textview inside the searchbar. The main difference was that I placed the Search on the second tab rather than the first. When I changed the taborder on my app to have the search on the first tab's navigation controller, it worked! It seems that unless I first enter the searchbar's textview. The object gets released and if I try to enter it later it fails. Very weird. I don't know enough about the objects here to say what the initialization sequence is but my guess is I need to do more initialization to get it to work.
go through the article in the link once more. especially through the "Setting up the Project" part.
In the article everything is set for the "selected view controller" which is the first one. And you say you implement everything to the second tab. Make sure you didn't implement everything in the first one of your project.
Let me know if this helps. If not I'll figure out something else.