I am building one custom module. I got following warnings from marketplace .Can anyone help me out in resolving these.
loadLayout method is deprecated. Please use \Magento\Framework\View\Layout\Builder::build instead
Error line : $this->_view->loadLayout();
renderLayout method is deprecated. Please use \Magento\Framework\Controller\ResultInterface::renderResult instead.
Error line : $this->_view->renderLayout();
_redirect method is deprecated. Please use \Magento\Backend\Model\View\Result\Redirect::render instead.
Error line: $this->_redirect('customer/account/login/');
Related
I am trying to use the new userVariables option, which is newly introduced in Testcafe's recent version.
I was wondering if the userVariables can be used through the CLI.
I understand that the variables could be added to the testcaferc.json as mentioned in the documentation:
https://testcafe.io/documentation/402638/reference/configuration-file#uservariables
I couldn't figure out a way to add or modify the variables and values through the command line.
Thanks in advance for any help/hints.
You can set up custom user variables only in the configuration file. Please refer the following topic for more info: https://testcafe.io/403403/release-notes/framework/2021-9-8-testcafe-v1-16-0-released#support-for-custom-user-variables-in-the-configuration-file
Also, you might want to track the following issue in the TestCafe GitHub repository: https://github.com/DevExpress/testcafe/issues/6621
I am trying to use oncePerFixture feature in TestCafe and get an error:
“TypeError: Cannot read property “testRun” of undefined.
I cannot figute out what is the problem?
I suppose that the problem is that you forgot to pass the t argument to the cleanDB function call inside the afterEach hook. If this does not help, please share your full example, as it's difficult to determine the cause of the issue without your full code.
i'm using following code to get the uid of a content object in my controller:
$this->configurationManager->getContentObject()->data['uid']
In TYPO3 9.5 backend at Upgrade -> Scan Extension Files there is a notice, that this function is deprecated. Until now i couldn't find an alternative to get the uid.
I'm not sure if i understand the message correctly, will this function still work in TYPO3 10?
Thanks for your help!
You don't need to worry about this deprecation message. In the migration notes you can see that the warning is about getContentObject in AbstractContentObject, and it tells you to rename getContentObject() to getContentObjectRenderer().
However, yours is not for an AbstractContentObject class, it detects it on a ConfigurationManagerInterface class, which has a getContentObject but no getContentObjectRenderer.
So you can safely ignore the message. As the Scan Extension Files window says at the top: "false positives/negatives are impossible to avoid".
I have been getting
Selenium::WebDriver::Element#value is deprecated, please use Selenium::WebDriver::Element#attribute('value') warning.
I am getting this warning message only for
page.find(:xpath, "//select").value.should == "general".
Can any one tell me how to use attribute('value') instead?
I suspect you use capybara?
Got the same message myself, but capybara currently still accesses the value directly as seen in https://github.com/jnicklas/capybara/blob/master/lib/capybara/selenium/node.rb#L16
I will send them a fix. Should be done in future versions hopefully
This has got to be a lamer question:
In my test project I am attempting to configure log4net. The following method call gives the error.
BasicConfigurator.Configure();
"type name expected but method found"
What am I overlooking?
Thanks,
Nick
Is this a compile time error or runtime error? Do you have a using log4net.Config statement in your class file? Does it still happen if you change it to reference the full class name?
log4net.Config.BasicConfigurator.Configure();
I'm not sure if linking to blog entries is verboten...
If you are trying to log NHibernate stuff, here is what I do:
How to show Log4Net info in NUnit (from NHibernate)
I also have a more basic getting started guide here:
Getting Started with Log4Net
oops.. I was trying to do this in the wrong context. I added the method call to my test project's constructor and we're good.