desactivate specific plugin stylesheet in Symfony 1.4 - plugins

I would like to desactivate one stylesheet of apostrophePlugin 1.4 to be able to overide it with my own definitions.
Do you have any tips to desactivate or at least make it loading last?
I read something about view.yml, where I could write:
default:
stylesheets:
- a.css: {position : last}
But I don't know how to get a.css inside plugin folder...
Thanks

Try:
Find a module in plugin where you want do exclude css
Override it's config dir with view.yml
Override view.yml

Related

TYPO3 what is the .layout deprecation 7.x to 8.x

i'm updating a project from TYPO3 7.6.32 to ^8. in the deprecation log i can find a lot of entries where the issue is:
29-04-19 12:13: EXT:form: Do not use "layout." anymore. Deprecated since TYPO3 CMS 7, this function will be removed in TYPO3 CMS 8.
questions:
what is EXT:form (its not an extension in typo3conf/ext/...)
what is "layout."
do anyone have any resources on how to rework that case
if any further information is needed just drop a comment, thanks - any help is much appreciated
This is probably usage of the FORM content object / content element.
See:
https://docs.typo3.org/typo3cms/extensions/core/Changelog/7.5/Deprecation-69401-AdoptFormToSupportTheExtbaseFluidMVCStack.html
You might have the following somewhere:
10 = FORM
10 {
layout {
containerWrap = <div><elements /></div>
elementWrap = <div><element /></div>
}
}
The "layout" part can be removed completely.
The extension "Form" mentioned is a system extension and located in typo3/sysext/form. The layout part was the configuration older versions used to configure the layout - which is nowadays done with FLUID templates.
The form extension layouts can be customized by configuring your own templates in TypoScript - see https://docs.typo3.org/typo3cms/extensions/form/I/FAQ/Index.html#how-do-i-override-the-frontend-templates

Where must finisher files (for powermail finisher) be located?

I am currently trying to add a finisher to my powerplay form.
The target is to delete all elements in a specific folder after the form is submited.
I currently use :
this tutorial
I first put this into my setup.txt
plugin.tx_powermail.settings.setup {
finishers {
1 {
class = Vendor\Ext\Finisher\DoSomethingFinisher
}
}
}
at this location: ftp://ftpIP/typo3cms/pagename/typo3conf/ext/powermail/Configuration/TypoScript/Main/setup.txt
Now i should create a PHP-File:
Add a php-file DoSomethingFinisher.php and extend your class with the AbstractFinisher from powermail:
But where shuld I place that PHP File? In the same place as the setup.txt?
Hope someone can help. Thank you very much.
Thomas
That question is related to TYPO3 autoloading and not to powermail. If you want to add PHP-Files to your TYPO3, you should use an extension.
There are some manuals how to get the autoloading to work with your PHP-Files (see https://docs.typo3.org/typo3cms/CoreApiReference/ApiOverview/Autoloading/Index.html).
You shouldn't modify the files in the folder powermail, otherwise you will be in trouble when you want to update the extension. Instead, create a new extension with extension_builder or take powermailextended and modify that extension.
Assuming you use powermailextended:
If you call the Finisher In2code\Powermailextended\Finisher\MyFinisher, then it needs to go in EXT:powermailextend\Classes\Finisher\MyFinisher - this is how Typo3 autoloads the PHP files.

How to disable the translate option of content in TYPO3 8.7 translation wizard?

In TYPO3 8.7 you can choose whether you want to translate or copy content elements. How can I disable the "translate" option in the first step of the wizard?
In a current project the customer prefers to have only the copy possibility.
The Core itself supports this starting with version 9, so there is currently no core-wise solution in 8.x.
But: You may write an extension supporting the same configuration parameters as v9 does by XClassing PageLayoutView.php. Please see the change that introduces the possibility to configure these buttons.
Thx to the hint from Andreas Fernandez I was able to backport the feature from TYPO3 9.x to 8.7.x by xclassing the method.
I've put everything together into a Gist:
https://gist.github.com/peterkraume/1c0feb30440449ba1c708aa5ea8d7991
I am just using a css-based solution.
Just add the following to "ext_tables.php"
// Custom Backend CSS
$GLOBALS['TBE_STYLES']['skins']['base'] = [
'name' => 'cytrus Base Backend Skin',
'stylesheetDirectories' => ['EXT:myext/Resources/Public/Backend/']
];
And then create a file "mycss.css" in "EXT:myext/Resources/Public/Backend/" with the following content:
[data-slide="localize-choose-action"] > div > div:first-child {display: none;}
that's it!
this is the result

Manage hierarchy / enforce priority of TS-templates

Well, there is actually another guy with exact the same problem. But until today, they didn't come up with a solution, that's why I'm asking it once again.
My entire TS is included by an extension in TYPO3 7.6.8. This works fine except with indexed_search. The TS inside my resources EXT get overwritten by the indexed_search default TS.
This is the order of the TS inside the Template-Analyzer:
SYS: TYPO3_CONF_VARS:FE:defaultTypoScript
EXT:fluid_styled_content/Configuration/TypoScript/...
... a bunch of other third party extensions ...
EXT:indexed_search/Configuration/TypoScript
EXT:templates_ext/Resources/Private/TypoScript
extbase
fluid
extensionmanager
belog
beuser
felogin
indexed_search
sys_note
realurl
So #7 is the extension which includes all my TS but it gets overwritten by #14. The only way to configure the indexed_search is inside the setup of the page template (which comes after all those above). But I want to avoid that to keep things clean.
Is there a way to prioritize a certain TS so that it doesn't get overwritten?
Open the TypoScript record, switch to the tab "Includes", at the bottom you will find the field Static Template Files from TYPO3 Extensions:. Select the value Include before all static templates if root flag is set.
Try putting the TS from your template extension inside the root page Setup field like this (adjust the path if necessary, your example says Resources/Private/TypoScript?):
<INCLUDE_TYPOSCRIPT: source="FILE:EXT:templates_ext/Configuration/TypoScript/setup.ts">
This should make sure that it is included AFTER all the other includes (I assume you included those via the includes tab?)

Why can't I access my extensions' settings on the frontend?

Trying to access a few settings that I've created in my constants.txt file. It looks like this:
plugin.tx_my_ext {
settings {
# cat=plugin.tx_my_ext/urgences; type=boolean; label=Activer les urgences
activerUrgences = 0
}
}
Then in my setup.txt file I have this:
plugin.tx_my_ext.settings.activerUrgences = {$plugin.tx_my_ext.settings.activerUrgences}
Any reason why I wouldn't be able to access my settings using {settings} in my Fluid layout?
BTW, my extension name does include an underscore _ between the words. I have tried removing the underscore, then removing the tx_, and then a combination of those two.
Any help would be appreciated!
Thanks
For ext with key my_ext it should be plugin.tx_myext.settings
Make sure that you 'Included static from extension' in your TypoScript Template. If your ext is not available on the list add it in ext_localconf.php like that:
\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addStaticFile($_EXTKEY, 'Configuration/TypoScript', 'MyExt');
Do not forget to clear System cache and FE cache at least million times ;)
Use TypoScript object browser to check if on given page your plugins TS is still available (maybe something resets TS in meanwhile:
Finally make sure that you don't clear $this->settings array within your controller, if you do manipulate it for any reason assign it to the view again before view rendering,like that:
$this->view->assign('settings', $this->settings);