Automation Studio "Undefined referenct to <Function Block>" compiler error - plc

In Automation Studio a new function block is created. The compiler gives an error of "Undefined reference to myNewFunctionBlock." This error message gives no information on how to solve the issue.
How do eliminate this error?

Add the function block to the Software\Library page.
Instructions
Open the Configuration View
Open Cpu.sw. This will open the Software page.
Expand 'Library Objects'
Open the Logical View
Drag your function block to 'Library Objects'

Related

Tc3_EventLogger library error in BeckHoff TwinCat3

When i'm trying to compile a program in TwinCat 3 using the library Tc3_EventLogger. I'm using TwinCat3 Build 4018.58.
I receive the following errors (Please take a look at the image below):
TC3 Compile Error Picture
These are the errors I received as plain text :
'Verbose' is no component of 'TCEVENTSEVERITY' [tc3_eventlogger, 3.1.28.0
(beckhoff automation gmbh)].
Cannot convert type 'Unknown type: 'TcEventSeverity.Verbose'' to type
'TCEVENTSEVERITY' [tc3_eventlogger, 3.1.28.0 (beckhoff automation gmbh)].
Initialisation of constant variable 'EMPTY_SEVERITY' not constant [tc3_eventlogger, 3.1.28.0 (beckhoff automation gmbh)].
I already tried to delete and add the library again but that didn't solve the problem.
How can I solve it?
Thanks

AEM 6 integration with Adobe Target problems

I am integratign AEM 6 with Adobe Target and have some problems with it.
Particularly, when I add "Adobe Target Mbox" component on the page - T&T request is sends but in console there is an error :
Uncaught TypeError: undefined is not a function.
I found that it throws when mboxOfferDefault.prototype.show(content) function is called from /etc/clientlibs/foundation/testandtarget/util/source/init.js.
The problem is that this function calls this.hide(content) which doesn't exists in mboxOfferDefault.prototype and that's why I suppose this error is thrown.
Can anyone tell me why this function in init.js is overriding default mboxOfferDefault.prototype.show(content) defined in mbox.js and what will be the risks if i'll remove this function from /etc/clientlibs/foundation/testandtarget/util/source/init.js ?
I will be appreciated if some one will help me with this problem.
Thanks!

Display and Expression Views are giving errors

I am using SpringSource Tool Suite 2.9.2 and Grails 2.0.3. I am trying to use the Expressions and Display windows, but both are giving me errors.
The Expression Window says:
org.eclipse.debug.core.DebugException:
com.sun.jdi.ObjectCollectedException occurred retrieving type
This message is different sometimes and says it could not get the right types as if I didn't include packages.
The Display Window says:
"Evaluation failed. Reason(s): An exception occurred durring
evaluation."
Anyone have any idea what is going on?
EDIT:
Andrew, all of those items in the Preferences were checked with the exception of "Enable extra Groovy debug support on all projects (not just Groovy projects)." which I checked.
I still get the error, and for some reason nothing is showing up in the log, but the Expressions opens a sub window that says:
See error log: startup failed:
__Eval.groovy: 7: unable to resolve class mydomain.User # line 7, column 23. import mydomain.User;
^
1 error
Something that is probably relevant: This import is the 3rd domain import on the page. The other two that look like they are working are in the "domain" folder in my "grails-app" folder, but the one that is not working is in "src/groovy" as the project is using Hibernate.xml files. I would expect the Expressions to work for either, but maybe this is the problem?
There are several things that you need to do before debug evaluations can work in Groovy. Most of the time, these things are configured automatically, but sometimes you need to do one or two things manually.
Go to Preferences -> JDT Weaving, make sure it is enabled
Go to Preferences -> Groovy -> Debugger -> Extended debugging. Make sure that all check boxes are selected.
If you are still getting this exception, then this may be a bug. Please update your question with the full stack trace from the error log (Window -> Show view -> Other -> Error log). Also, include the code snippet that you are evaluating.

Getting an error while writing a custom velocity macro

When creating my own macro, and trying to add it so that anyone can use it, I get the following error:
Error number 4001 in 4: Error while parsing velocity page /templates/docdoesnotexist.vm
Wrapped Exception: Cannot start the Velocity engine
I do not change that file, but I do change xwiki/templates/macros.txt and /macros.vm by adding recentChanges=velocity:recentChanges: and #macro(recentChanges) respectively (yes, I do add working content after #macro(recentChanges))
That looks like a syntax error in macros.vm. You should revert to the original macros.vm and first try to write your custom macro in a wiki page. Once it works, you can move it to macros.vm and restart the server.
macros.txt shouldn't be edited, it's a legacy file used by the older WYSIWYG editor.

Ways to call Blocks within Magento: createBlock vs Layout xml file

Context: I'm trying to include Adminhtml blocks in the frontend of the site to replace some of the user account blocks. The first thing I'm trying to do is simply display the block on the correct page. I can replace the entire page by setting the Body of the response inside the controller, but I'm having a hard time including the block in the layout xml file and then calling it within the template.
This block's default template is adminhtml/default/default/widget/grid.phtml. So I have placed widget/grid.phtml and widget/grid/ folder (needed by widget/grid.phtml) inside of the frontend theme.
I'm using community edition v1.3.2.2
Why would I be able to create an adminhtml/sales_order_grid from Mage_Sales_OrderController using createBlock:
$this->getResponse()->setBody($this->getLayout()->createBlock('adminhtml/sales_order_grid')->toHtml());
But not from a frontend layout, using a declaration
<sales_order_history>
<reference name="content">
<block type="adminhtml/sales_order_grid" name="orders_widget"/>
</reference>
</sales_order_history>
within app/design/frontend/default/default/layout/sales.xml
The latter produces an error without a stack trace:
Fatal error: Call to a member function toHtml() on a non-object in app/code/core/Mage/Core/Model/Layout.php on line 526
That line is the function getOutput() that Alan refers to below. The data in callback[0] is blank. As far as I can tell, it's null. When output to a log, it's blank. get_class(callback[0]) returns nothing discernable as well.
As far as I can tell, no blocks are rendered. There is nothing shown in the browser except the error message. In the log, the only output from the getOutput() method within app/code/core/Mage/Core/Model/Layout.php is the one where it breaks - no block name in callback[0].
However, I do know that _prepareCollection on the sales_order_grid block is being called.
Update: It turns out that I can get the block to render by adding it to the layout file. The call that throws the error is in app/code/core/Mage/Sales/controllers/OrderController.php in public function historyAction(). The call to $this->renderLayout() is what causes the problem. Evidently, I can't have both the grid block and the history template rendered in the same action. I'm not sure why though.
Thanks for any guidance!
More details about the other customizations you've done to get yourself to this point might help people troubleshoot your problem. When I tried your "create the block programmatically" code I got the following error.
Warning: include(/path/to/magento1point4.dev/app/design/frontend/base/default/template/widget/grid.phtml) [function.include]: failed to open stream: No such file or directory in /path/to/magento1point4.dev/app/code/core/Mage/Core/Block/Template.php on line 189
I added a simple phtml template to the above location and was able to insert the block via a layout file succfully after that
<reference name="content">
<block type="adminhtml/sales_order_grid" name="orders_widget"/>
</reference>
So I suspect something you've done along the way already is tripping things up.
Also, a Magento version would help things. Line 526 of the current version of community edition is a comment.
All that said my best guess is things are failing in the getOutput method of the Layout class. I'd add some logging to the function on your dev server to see what Magento is trying to do/instantiate when it bails on you.
public function getOutput()
{
$out = '';
if (!empty($this->_output)) {
foreach ($this->_output as $callback) {
Mage:Log('Trying to get the block ' . $callback[0] . ' and call its ' . $callback[1] . 'method');
$out .= $this->getBlock($callback[0])->$callback[1]();
}
}
return $out;
}