TYPO3 Extbase getArguments from other Extension - typo3

I've got an extension with two plugins and I need to access the getVars from both.
$this->request->getArguments();
The above code gives me, of course, only the vars from the current plugin.
Anybody knows how I can access the Vars from a different plugin?
Thank's alot!
Cheers,
lufi

Inside an extension, you do not have access to the request arguments of an other extension. This is only possible using the old way via
$_REQUEST or \TYPO3\CMS\Core\Utility\GeneralUtility::_GP("varname");
Check out:
\TYPO3\CMS\Core\Utility\DebugUtility::debug($_REQUEST); to get the right array keys and var names.

Related

TYPO3 Hook not found

I am currently trying to write a Hook to add extra fields to a Flexform. Therefore I followed this tutorial: https://docs.typo3.org/typo3cms/extensions/news/DeveloperManual/ExtendNews/ExtendFlexforms/Index.html?fref=gc&dti=250938618364487#extend-flexforms-with-custom-fields
But when I go to a page in the backend that contains an options from a Flexform I get the following Error:
Class 'ID\SearchBarAdditional\Hooks\FlexFormHook' not found.
I register the Hook in the ext_localconf like this:
$GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS'][\TYPO3\CMS\Core\Configuration\FlexForm\FlexFormTools::class]['flexParsing'][] = \ID\SearchBarAdditional\Hooks\FlexFormHook::class;
and my Hook-file is here: typo3conf/ext/search_bar_additional/Classes/Hooks
and is initialized that way:
namespace ID\SearchBarAdditional\Hooks;
class FlexFormHook { /* ... */
So in my opinion everything is in the right place and should work, but I do still get the error that TYPO3\CMS\Core\Utility\GeneralUtility::makeInstance("ID\SearchBarAdditional\Hooks\FlexFormHook") fails.
Do you guys have any ideas, what could be wrong? Do I have to register the Hook in \TYPO3\CMS\Extbase\Utility\ExtensionUtility::configurePlugin( or something similar (as the posted code is really the only thing I've done)?
This is a typical class loading error. Check that you added your PHP namespaces to composer autoloading and/or ext_emconf.php and make sure your filenames are correctly named according to PSR-4. If in doubt you can inspect the class loading map files generated by composer in vendor/composer (if you use composer for class loading, which you definitely should do).
I found the mistake: My Hook does indeed not get loaded. I tried to 'include' it in the ext_localconf.php and it is working now.
But as this is of course an extremely ugly solution I posted a second question, how to load a hook here: Typo3 8.X - autoload Hook
Thank you for your help!!!

Class 'kartik\base\InputWidget' not found

In my Yii2 apps I add extension select2, since composer not successfully downloaded all the needed librarys. So I do it manually but I have still have error. Any help is BIG THANKS.
Here is my error.
I think since you did it manually you
forgot to add this file: input widget file
or did not specify proper path to it.
Check these and come back if any issues prevail.And always try to use composer as it's better to solve composer errors than finding what is missing after doing the entire set up.Isn't it? ;)

TYPO3: File Upload Error in front using upload_example extension

I have installed upload_example extension in TYPO3 7.6.11. It works very well from admin. However, when i try to submit form with images it throws the error: 1298012500: Required argument "newExample" is not set for Helhum\UploadExample\Controller\ExampleController->create.
I checked every configuration, everything is set. I stuck. I am new in typo3.
Can you help please?
Thank You
You can debug using debugutility inside initializeMethodAction(). I must be called in such case when model argument is not found.
Or as a reference for file uploading you can refer this link. hopefully, it will help you
http://blog.typo3servers.info/show/typo3-extbase-fal-image-upload/

Why can't I find control using sap.ui.getCore().byId()?

I'm trying to access an input control in the controller but I'm not able to fetch it.
I'm using
sap.ui.getCore().byId("id of the input");
I faced a similar issue when I started using UI5. The id is not the same anymore because Sap UI5 dynamically concatenates some other properties to your id so it will be different. Hope this helps. try finding out the id after it has been changed by the resources.
https://openui5.hana.ondemand.com/#docs/guide/91f28be26f4d1014b6dd926db0e91070.html Hope this doc will help you.
You should use relative navigation(this.getView().byId('myId')). Absolute Navigation(sap.ui.getcore().byId('myId')) is not recommended, since that will not work anymore if you change like local project to FioriLaunchpad.
I think the source code of byId of Controller and createId of View explains a lot.
Try the following:
this.byId('controlId')
Or:
this.getView().byId('controlId')
See Difference Between this.getView().byId(), this.byId(), and sap.ui.getCore().byId()

How can I expose plugin functions to docpad partials?

tldr; Is there a way to expose functions defined in one plugin for another plugin to use?
I'm trying to use the tagging plugin (https://github.com/rantecki/docpad-plugin-tagging) within a partial.
I have a Jade partial setup as follows:
.post-tags
| Posted in
each tag in tags
a(href=getTagUrl(tag))= tag + ' '
where getTagUrl is a function defined by the tagging plugin. The problem is that the partial has no knowledge and this partial does not render.
As v2.8.0+ of the partials plugin now includes the template data by default (you don't have to manually specify it's inclusion anymore), try running docpad update in your project's root directory and trying again. Otherwise, we'll probably have to see the source code of your project to help isolate the issue.
It's because partial do not have access by default to templateData, the object holding the getTagUrl helper. You have to pass it explicitly to the partial.
Here's a similar answer provided for the eco templating language :
https://stackoverflow.com/a/16631649/232943