Why does this viewHelper error occur in TYPO3 and how do I fix ilt? - typo3

When trying to get my custom extension to run in TYPO3 v9.5.11, I get this error message:
Undeclared arguments passed to ViewHelper
TYPO3\CMS\Fluid\ViewHelpers\FlashMessagesViewHelper: renderMode, class, id.
Valid arguments are: queueIdentifier, as
I do not exactly know who is trying to pass arguments to the ViewHelper and why it would be failing.
Would creating my own viewHelper be beneficial in this scenarion or is there an easy way of fixing the issue?

in your custom extension, the FlashMessages ViewHelper is used.
You can easily search recursively for <f:flashMessages in the extension folder.
The error message gives you the changes, you need to do:
Valid arguments are: queueIdentifier, as
But in your extension, the arguments renderMode, class and id are used.
You need to remove the invalid arguments, maybe the documentation gives you the needed hints: https://docs.typo3.org/other/typo3/view-helper-reference/9.5/en-us/typo3/fluid/latest/FlashMessages.html

Related

Create New Parameter

Trying to create a new parameter in StreamSets and I am getting this error >
I am following exactly the official tutorial, but it seems this validation is new!
The behavior for handling pipeline parameters has not changed recently.
Looking at the image you provided, the parameter is not specified correctly. You have $(p_batch_size); the correct format for the parameter is ${p_batch_size}. Try replacing the parentheses with braces.

"Modules that use an anonymous define() call must be loaded with a require() call"

In the walkthrough step 7: JSON Model example, the app apparently works as documented but I see the following error in the console:
Error: Modules that use an anonymous define() call must be loaded with a require() call; they must not be executed via script tag or nested into other modules.
The only other instance of this message that I could find seems, to my untrained eye, to deal with a wholly different scenario.
I've tried both Firefox and Chromium, CDN hosting vs local hosting, two different UI5 versions (1.77.0 and 1.79.0), both minified and plain, so I'd suppose this is really something in the code itself.
What could it be? Also, is it something I can safely ignore and why?
Anonymous define
Calling sap.ui.define([...],...) defines a module anonymously because the 1st argument is not a string (module name) but a list of the module's dependencies. If the module name is omitted, the framework automatically determines it based on how the module script was referenced.
Use anonymous sap.ui.define once at top-level of the JS file content, not multiple times.
Replace sap.ui.define with sap.ui.require when simply requiring existing modules.
Cf. my comment at https://github.com/SAP/openui5/issues/2203#issuecomment-420918457.
Named module define
The 1st argument in sap.ui.define("MyModule",[...] ,...) defines the name of the module manually which must be passed when:
Defining a nested module within an existing module definition in a single JS file content.
Defining a module which was initiated by a <script> tag from HTML.
The walkthrough is fixed with SAP/openui5#6302b8f and SAP/openui5-docs#43 accordingly.

Node.CloneNode() not a function -dom-to-image.js

I want to create a .png file of a HTML page in angularjs and download it. For this I'm currently using dom-to-image.js and using the domToImage.toBlob function and passing the node element to it. But internally when it goes to dom-to-image.js it throws the error:
node.cloneNode() is not a function
Can anyone please assist me here?
Thanks
This error arises when you attempt to call cloneNode() on anything other than a single DOM node.
In this case, the error is coming from the dom-to-image library, which calls that method internally.
Note that without a code snippet, its hard to identify the precise issue with your code, but the point is, when you call domtoimage.toBlob(), you need to supply a single DOM node.
So double check what you are calling it with. If you are selecting by class, for instance, you could end up with more than one element.
Its best practice to be precise with which node you want to convert to a blob - use the id attribute, like this:
domtoimage.toBlob(document.getElementById('element')).then(...)
where element is the id of your target node.
Its also possible you're selecting with angular.element() or even using jQuery directly.
In both cases, this returns an Object -- which you can't call cloneNode() on.
Also note the following from the Angular docs for angular.element():
Note: All element references in AngularJS are always wrapped with jQuery or jqLite (such as the element argument in a directive's compile / link function). They are never raw DOM references.
Which means you would observe the same behavior in both cases, e.g. both of these:
domtoimage.toBlob($('#element')).then(...)
domtoimage.toBlob(angular.element('#element')).then(...)
would result in the error you see. You can index the Object before supplying it to domtoimage.toBlob(), perhaps like this:
domtoimage.toBlob($('#element')[0]).then(...)
domtoimage.toBlob(angular.element('#element')[0]).then(...)
and that would also work.
Also check out this post about "cloneNode is not a function".

How do I make Cloudformation reprocess a template using a macro when parameters change?

I have a Cloudformation template that uses a custom Macro to generate part of the template. The lambda for the Macro uses template parameters (via the templateParameterValues field in the incoming event) to generate the template fragment.
When I change the Cloudformation Stack's parameters, I get an error:
The submitted information didn't contain changes. Submit different information to create a change set.
If I use the CLI I get a similar error:
An error occurred (ValidationError) when calling the UpdateStack operation: No updates are to be performed.
The parameters I am changing are only used by the Macro, not the rest of the template.
How can I make Cloudformation reprocess the template with the macro when I update these parameters?
After working with AWS Support I learned that you must supply the template again in order for the macro to be re-processed.
Even if it is the same exact template it will cause the macros to be reprocessed.
You can do this via the Console UI (by uploading the template file again) or the CLI (by passing the template / template URL again).
I recently came across this when using the count macro to create instances.
I found i was able to modify just the parameters used just by the macro by moving that part of the template to a nested stack and passing the parameters through.
It does involve a bit more work to setup by having the separate stacks, but it did allow me to modify just the parameters of the parent stack how i wanted.

Open Graph Object Debugger gives error when have both header and object tags?

The website I am working from is:
www.randompostsonsocial.com/quote-status.php
I made sure to have tags on both the header as well as the object (maybe that's the problem).
I get the following error on FB (open graph object) debugger..
Object Missing a Required Value | Object at URL
'http://www.randompostsonsocial.com/' of type 'website' is invalid
because a required property 'og:title' of type 'string' was not
provided.
I don't know what steps I may have not taken, this is my first try.
I have included the object with the parameters as well as in the header maybe that's redundant don't know what way there is around that.
Any input on my code might help. not sure.