When Choosing Rules/Manage Rules and Alerts How Does Outlook Know One Or More Rules Contain Errors? - rules

I have been working with the Rules object and its Rule members. I have not found any property that indicates a rule has an error. Yet when I select Rules/Manage Rules and Alerts Outlook takes very little time to say that One or more rules contain errors. When scrolling through the rules I notice that a few of them are flagged as having errors. However, I cannot find any Rule property that indicates it has an error.
How does Outlook know that there are rules with errors and which ones have an error? It doesn't seem likely that Outlook walks the entire rules collection and checks each rule for errors each time you look at the collection. So how does it know there are errors and which rules have them?
I looked at all of the Rule properties. If I look at a move to folder rule and try to reference the folder name, the system will throw an error if the folder is undefined (code 91). However, I could not find any flag that said there was an error in the rule. Yet, when I used Rules/Manage Rules and Alerts to scroll through the rules the rule was flagged as having an error: (Error) next to the name.

Related

Eslint complaining about hyphens in variable name

So I have to use a specific variable name (g-recaptcha-response) in my form post in order to pass a captcha process using google recaptcha V2. The thing is eslint will always complaint about the variable name wit the error "Parsing error: Const declarations require an initialization value". I know the problem it's because of the hyphenated name convention but I can't find anywhere the way to bypass this rule and I have to use that name since it's a re-captcha parameter that needs to be send with the form.
const g-recaptcha-response = await this.$recaptcha.getResponse(),
I need to make something like that work within an eslint /& vue-3 template with composition API, any feedback will be really appreciated.

Firebase storage rule resource variable returns null

I wrote a simple rule,
rules_version = '2';
service firebase.storage {
match /b/{bucket}/o {
match /image/{fileName} {
allow read: if resource != null;
allow write: if false;
}
}
}
Then I added a file in /image folder in the default bucket. Using the Rules playground simulator tries a read request to the file and it failed. It is saying the resource is actually a null.
Any ideas why? From their documentation it seems like it should not do this or am I missing something? Any help will be highly appreciated.
(Update) Following was what I originally tried doing,
--- (Update in response to Franks post)
Hi Frank, I tried exactly what you suggested, still no luck :(. Attaching the screenshot here.
(Update) Frank's suggestion is correct, the file name mismatch was the issue as you originally suggested. The actual file name is scribble.jpg and I typed scibble.jpg in the simulator. After correcting, it was working as expected.
While I thought I could reproduce the problem, after carefully copy/pasting the paths of some existing files, I can now no longer reproduce this in any project/test.
No idea what's going on for you, but I recommend copy/pasting the file names/paths as I did. Especially check for training spaces with in the file name, and in the Location value you enter in the playground, as they are incredibly easy to overlook and will cause the rules to fail.

HtmlUnit Doesn't Recognize Valid CSS

So, I just started using HtmlUnit (literally just now), and I've already run into an error. I have some simple code:
fun getPage() { val page: Page = WebClient().getPage("http://htmlunit.sourceforge.net") }
However, it throws an extremely long error:
WARNING: CSS error: 'http://htmlunit.sourceforge.net/css/apache-maven-fluido-1.5.min.css' [9:90176] Error in declaration. '*' is not allowed as first char of a property.
Jan 24, 2018 4:14:58 PM com.gargoylesoftware.htmlunit.DefaultCssErrorHandler error
WARNING: CSS error: 'http://htmlunit.sourceforge.net/css/apache-maven-fluido-1.5.min.css' [9:91151] Error in declaration. '*' is not allowed as first char of a property.
Jan 24, 2018 4:14:59 PM com.gargoylesoftware.htmlunit.IncorrectnessListenerImpl notify
WARNING: Obsolete content type encountered: 'text/javascript'.
Jan 24, 2018 4:15:00 PM com.gargoylesoftware.htmlunit.javascript.StrictErrorReporter runtimeError
//continues the above sequence a lot, and then ends with:
SEVERE: runtimeError: message=[An invalid or illegal selector was specified (selector: '*,:x' error: Invalid selector: :x).] sourceName=[http://htmlunit.sourceforge.net/js/apache-maven-fluido-1.5.min.js] line=[25] lineSource=[null] lineOffset=[0]
I looked at the link provided by the error, and it seems to contain a lot of asterisks inside of their CSS. 194, to be exact (including asterisks used in the commented area). I also experimented with loading other web pages, and it appears to be that it has issues understanding that the CSS of web-pages is valid.
Am I doing something wrong, or should I just tell it to ignore CSS? (I'm not sure if that's possible, but I would prefer it.)
At first regarding the css warning
it is a warning
see star hack for more info about this
if you still think this is valid css please open an CSSParser issue and i will have a look
Second: An invalid or illegal selector was specified....
This is really common if you are testing pages with HtmlUnit. The background is that many javascript libs (like sizzle used by jQuery) doing some checks to figure out what features are supported by your browser. And the output you see is the result of one of this checks. This one tries to figure out, if the javascript select method is able to work with a special kind of css-selectors. There is a try-catch around this selector usage in the javascript code and if the selector fails (in fact this happens in many browsers) the features is not available and the lib falls back to some other way to do the selection. The reason for seeing this in the error log is part of HtmlUnit history. This lib was initially designed for web testing and based on this the lib logs every javascript exception at the moment the exception is thrown (even if the exception is catched/handled later on). So you can more or less ignore this; the HtmlUnit does not stop working because of this.

Not able to delete 2sxc view

I'm not able to delete a 2sxc view. getting a warning
"Had an erro talking to the server (status 400).
Massage:Bad Request
Detail:found 2 relationship where this child - the parents are:3854 (2sexyContent-ContentGroup), 3897 (2sexyContent-ContentGroup)."
Please find warning image attached.
This means the template is still in use. You can either find out where exactly, delete the module and the dnn-trash, then you can delete.
Alternately you can force-delete it (not recommended). To Force-delete, go to "Data" and switch to debug-mode and change scope to "2SexyContent-System" http://2sxc.org/en/blog/post/advanced-dynamic-data-content-understanding-content-type-scopes.
There you'll find the content-item describing the template, which you can delete, and force-delete.

Plone traversing and forbidden Zope ids

Although you can generate by code contents with an id that starts with underscore, like "_foo" it seems that you can't traverse an item with this special id.
Every attempt to access a content named that way using a browser lead to a NotFound error. Neither methods like __bobotraverse__ or __getitem__ are called, like if this limitation is checked very early.
How this limitation works and how can I change it? Can I access subobjects with a prefix underscore in the id?
Found inside the unrestrictedTraverse implementation from OFS.Traversable:
if name[0] == '_':
# Never allowed in a URL.
raise NotFound, name
...but this is not enough. There's another check similar to the ones notified by #Mathias inside ZPublisher.BaseRequest.DefaultPublishTraverse in the publishTraverse method.
if name[:1]=='_':
raise Forbidden("Object name begins with an underscore at: %s" % URL)
The sad part is that is not simple to override this:
the unrestrictedTraverse is called on the Plone site context (so I can't customize it only for my content type)
the publishTraverse method is owned by the request implementation (maybe for this I can use ad custom publish traverser?)
The simplest way to fix this seems through monkeypatch.

Resources