"Extraneous Property" and "Parser Mismatched Metadata" errors in the Facebook debug validator - facebook

I am working on refactoring of one older page and I have problem with Facebook debug validator.
Extraneous Property
Objects of this type do not allow properties named 'twitter:card'.
Extraneous Property
Objects of this type do not allow properties named 'twitter:title'.
Extraneous Property
Objects of this type do not allow properties named 'twitter:description'.
Parser Mismatched Metadata
The parser's result for this metadata did not match the input metadata. Likely, this was caused by the data being ordered in an unexpected way, multiple values being given for a property only expecting a single value, or property values for a given property being mismatched. Here are the input properties that were not seen in the parsed result: 'twitter:card, twitter:title, twitter:description'
Should these tags has any importance? Or how I can repair it?

Related

Passing complex object as parameter to sub-stack

I want to pass the output of a custom resource, which is an array of objects, as parameter to a sub-stack. An example of what I want to pass as parameter to the child stack is :
[
{"Role":"Role1","IdentifierType":"Prefix","Identifiers":"Bucket1"}
{"Role":"Role2","IdentifierType":"Prefix","Identifiers":"Bucket2"}
]
How do I pass this to the sub-stack? I tried declaring the parameter in the child stack as String, and later as CommaDelimitedList. Both the times, the stack gave an error: "Value of property Parameters must be an object with String (or simple type) properties"
As I know until now, there is not way to pass complex objects as a result of of stack execution. Like the message say, the outputs need to be string or single types (integer and boolean in case of cloudformation).
Without more information is hard to help you with alternatives, but let's assume that your Custom Resource is based on lambda. And let's assume that you have control about the code of your Custom Resource. If this is the case you can:
Send the resource identification of your custom resource as a parameter for your nested stack;
Inside nested stack, invoke the lambda function again with the resourceId as a parameter;
Change the lambda code to check for a new parameter for the resourceId (inside the ResourceParameters, not inside the Common Resource Id sent by CloudFormation).
If the parameter is not empty (or not a defined value passed on the first invocation) respond with the old values (you must have a way to keep this values in some place or check then in runtime.);
Change the lambda code to do not take action in the update/deletion is case of invocation by the nested stack (with the resourceId parameter).
Again, is hard to think in alternatives without more info about your specific problem. But use this response as a food for thought.

Binding.scala FXML: How to populate an ObservableList property

I have code like this:
val state = Var(initialState)
// ...
type SavedSearchCmb = ComboBox[SavedSearch]
val savedSearchesCmb: Binding[SavedSearchCmb] =
<SavedSearchCmb>
<items>
{state.bind.savedSearches}
</items>
</SavedSearchCmb>
The compiler complains,
[error] found : Seq[com.dev1on1.timer.YouTrackAPI.SavedSearch]
[error] required: javafx.collections.ObservableList[com.dev1on1.timer.YouTrackAPI.SavedSearch]
[error] <items>
What's the right way to generate the items?
According to the specification of FXML:
A read-only list property is a Bean property whose getter returns an instance of java.util.List and has no corresponding setter method. The contents of a read-only list element are automatically added to the list as they are processed.
items is a list property of SavedSearchCmb, however, it is not read-only as there is a setter setItems. As a result, the previous version of Binding.scala does append content of the savedSearches to the items property, instead, it tries to assign the Constants to items via setItems.
That is to say, the previous behavior of Binding.scala is extractly correct according to the specification.
The FXML behavior is very inconvenient.
Fortunately, Binding.scala does not have to support the extractly same syntax of Oracle's javafx.fxml.FXMLLoader.
I decide to break the specification, allowing appending content of the data-binding expressions to any list properties, no matter it is read-only or not.
The change has been include in Binding.scala 11.0.1. Your code should compile if you upgrade to Binding.scala 11.0.1.
We can do better than the original FXML specification. That's why you choose Binding.scala over javafx.fxml.FXMLLoader.

How to get an element's property in WebKitGTK?

I want to get an element's property (for instance, value) in WebKitGTK. I can easily get an attribute, and I can also get some properties of some types by using e.g. webkit_dom_html_input_element_get_value, but is there a general way of getting any property of any element which has that property?

Spring batch: FieldSetMapper should set field to null instead of empty

I am using spring batch to read pipe (| delimited) separated file which have have 7 field. I created a class called MyLineMapper that extends spring's FieldSetMapper. This class maps field values provided in file to my object (XYZ type). Now the problem is that fieldSet object that i get inside class extending FieldSetMapper contain empty value for field that are not present in delimited values.
For example:
Suppose that the delimited file format is as follows: |ID|Country|City|Pin|
Suppose i provide following line in file: |1|India|
As you can see the above line does not contain information for City and Pin. Therefore, I expect FieldSet object should contain Null value for these two fiels (City and Pin) instead of empty string. I don't want empty value as Null will help me to know if that field was actually present in file or not.
How can I achieve this ? Do I need to extend DelimitedLineTokenizer which I am using for tokenizing ? Or this is a simple way to do this ?
Any help will be appreciated.
From FieldSetMapper javadoc
To customize the way that FieldSet values are converted to the desired
type for injecting into the prototype there are several choices. You
can inject PropertyEditor instances directly through the customEditors
property, or you can override the createBinder(Object) and
initBinder(DataBinder) methods, or you can provide a custom FieldSet
implementation.
Depending on type of your target bean conversion is done using default Spring convention. If you need other type of logic write your own.

get values of multiple checkboxes in extbase/fluid TYPO3

How to get values of multiple checkboxes checked in frontend template with fluid and use these values in action extbase?
Declare the argument in your controller action and give it a type array or an array-compatible type which can be constructed by the PropertyMapper.
Name all fields the same as this argument.
Post the data and use the argument in the controller action.
This is the correct way of receiving an array as value of a controller argument. Accessing it directly from the request is not recommended, unless you also declared the argument on the controller action. Not doing so will bypass important argument processing.
save them in a form and retrieve the POST data trough:
$this->request->getArgument('variable')