ExtJS-6 Dataview Extension Issue - events

I have extended a view.View to isolate just some of the events that are fired from the store (code is found at https://fiddle.sencha.com/#fiddle/1777)
The problem I am having is that when a record is added, it should fire a custom event for the controller to pick up; however, I am getting an error in the console
TypeError: owner.up is not a function
I am somewhat at an impasse at this point as I have attempted debugging the issue and the only thing I can come up with is that the error is occurring at the:
this.fireEventArgs('added',[...]);
In the globals.AltStdView class. Can someone please advise me on what I am incorrectly doing? Thanks!!

Firstly, me.getView.dataView.store.add(record); is wrong. getView is supposed to be a method.
Secondly, added is already an event used by the framework for components. You should pick a different name.

Couple of Issues here,
As #Evan mentioned, me.getView is a function. So it should be me.getView().
You are firing an "added" event which is actually inbuilt event of DataView and because of this listeners of added event are throwing errors as event args different. So i renamed the event to 'recordadded'
After applying the above fixes, here is the working fiddle.
https://fiddle.sencha.com/#fiddle/177v

Related

How can I view specific instances of errors in Sentry

For instance:
I search for errors that happened to a specific user by searching for their email address in the search bar. That brings me back a list of errors. When I click on one of the errors it shows me a similar error that happened to a different user. How can I find the exact error that occurred for the user I searched for?
Thanks in advance,
Dan
Assuming you're talking about Sentry 9 (current version). Inside of an issue, go to the events tab:
And there should be another search box to search for concrete events within that issue.
Piggy-backing off of Markus' answer, I'd add that the syntax for this events search screen is different than the main search.
I found this issue:
https://github.com/getsentry/sentry/issues/2898
The syntax of event.timestamp is mentioned, however it doesn't work on the event page (perhaps because the event is implied?).
These examples work for zooming into a specific time and device:
timestamp:>2022-08-15 timestamp:<2022-08-17
timestamp:>2022-08-16T09:00:00 timestamp:<2022-08-16T16:18:00
device.family:SM-G990U

Azure Event Grid deploy fails due to 'cannot update during provisioning'

We have an Event Grid with a couple of Functions attached to it as listeners. We're doing some load tests and are seeing a lot of functions fail, which means that event grid will resend those events.
However, if we try to redeploy Event Grid (using ARM), we get the following exception: 'Resource cannot be updated during provisioning'. So far, the only thing we've found that works to deploy it is to tear down the existing Event grid and deploy a fresh one, obviously not ideal. Is this a known issue, or are we doing something weird?

No ajax action fired after session invalidate

We have a JSF webapp with Primefaces 4.0 and CAS Single Sign On.
When a user requests an ajax action (by clicking a p:commandButton or similar component with ajax=true) after he has lost his session because SSOut in another tab, nothing happens, no response from server or action is triggered.
We need to manage that situation to inform the user that his session is no longer available, by showing a dialog or redirecting him to home or a custom page, but we don't know how.
ajax=false solves the problem, but this is not what we want to do.
No ViewExpiredException is thrown.
EDIT:
We had already read and tried this BalusC's solution without success. No Exception is thrown and Handler has nothing to do. Note that isn't an Expired Session or Invalidated by TimeOut session, is just an explicit session.invalidate caused by Cas Sign Out in another tab.
We also tried javascript jsf.ajax.addOnError() solution, and again nothing to capture.
Only p:ajaxStatus onError event catches something, but no way to identify that particular error. Even overriding ajaxStatus javascript function, error data parameter is undefined...
Also, p:log says "Request return with error:error." but, which error is it? how do we identify it?
We are stuck on this issue...
This has been discussed many times, and as far as know there aren't any out-of-the-box solutions yet. One solution is to add a custom ExceptionHandler as stated in this post.
Another option is to register client error handler using jsf.ajax.addOnError(...), and to handle this exception in it. You might need some server code to add a custom header in case session is invalid, which you would use in error handler to be able to differentiate that specific case from other errors.

Handle Incoming call crash while App Start

I have run into an Interesting scenario. Its also present here by someone on msdn forums
When I launch my application, if I lock the screen or if a call comes at that time and on resume after unlocking or disconnecting the call in respective scenarios, the application crashes throwing 0x8000ffff error. This I have observed also happens when an emailcomposetask is open from my application.
Previously I thought that it was because I was not handling Obscured and Unobscured. But now that I am handling them, still I am receiving the same case. I have observed that many other applications also crash but there are some applications like Facebook and Twitter which are able to handle it. Has any one faced this same situation? Can you please provide me a fix for this?
Am I doing anything wrong?
also note that I have changed my default loading page. Its not mainPage.xaml but xyz.xaml, where I am checking for tokens and redirecting user to mainPage automatically without any button click.
Edit : Added StackTrace
at Microsoft.Phone.Execution.NativeEmInterop.NotifyFullObscurityChanged(Boolean isObscured)
at Microsoft.Phone.Shell.PhoneApplicationService.OnFullObscurityChanged(Object sender, LockStateChangeEventArgs e)
at Microsoft.Phone.Shell.Interop.ShellPageManager.ShellPageCallback_OnLockStateChange(Object source, LockStateChangeEventArgs e)
at Microsoft.Phone.Shell.Interop.ShellPageCallback.FireOnLockStateChange(Boolean fLocked)`
This mainly happens because of the code in OnNavigatedTo() and Page_Loaded() event handlers. Place break points and check for the issues in those two methods.
When an app is resumed in the cases you mentioned, these two methods are called in the same order.
Hope this solves your problem.
Update based on your comments:
There you are. You are clearing the entire Navigation history, and hence it dont know where to go now(even the current page is removed).
My suggestion is, Move your back history removal code from OnNavigated to the Page_Loaded event.

I can't enable or disable modules. I'm getting "An error occurred while saving this configuration"

I have a new fairly fresh install of Magento 1.7.0.2. I installed two custom payment method modules that are working fine. But now whenever I try to disable or enable any Payment Method or Shipping Method it gives me an error like this:
An error occurred while saving this configuration: Warning:
preg_match() expects parameter 2 to be string, array given in
/app/code/core/Mage/Adminhtml/Model/System/Config/Backend/Encrypted.php
on line 57
Do you have any idea why?
EDIT 2:
I found the problem. It was caused by a patch I applied to fix to a previous BUG. :P
EDIT:
So I disabled all custom modules and I was still getting the same error. I logged what was happening and it seems that some core modules are sending an array to be saved.
Like PayPal Express Checkout for instance. One of the config options is the Time of Day in the SFTP credentials for Settlement Report Settings. It's composed by three different drop-downs and it's sending an array to be saved!
In the Shipping Methods, UPS has a config options called Allowed Methods, and it's also sending an array!
I still don't know why it wasn't happening before and now it is. They shouldn't be encrypting everything. Any clues?
I had the same issue, its a known bug, try this around line no. 135 on code/core/mage/Adminhtml/model/config/data.php
// add this code
$backendClass=false;
if (isset($fieldConfig->backend_model)) {
$backendClass = $fieldConfig->backend_model;
} // before this
if (!$backendClass) {
$backendClass = 'core/config_data';
}
This actually is a reported bug in Magento that seems to affect encrypted config settings (passwords, API keys, etc.).
http://www.magentocommerce.com/bug-tracking/issue?issue=14217
Try disabling the first of the modules, log out of the admin panel, clear /var/cache and see if the problem still exists. If it does, do the same with the second module.
The problem should be gone. Now that you know which module causes the problems you can either decide to try another module instead or debug to see whats going wrong.
Put a breakpoint on line 57 in /app/code/core/Mage/Adminhtml/Model/System/Config/Backend/Encrypted.php to see what goes wrong. It seems that the second parameter is not a string (might be null for example due to wrong configuration or something) when its given to the preg_match function. Maybe this helps you to identify the problem.
Regards
Disabling modules through the back office isn't a good idea as it only disables the block output, if you would like to disable a module you should go to app/etc/modulesand there you should find Module_Name.xmlfile - in this file just put false in active node.

Resources