Typo3 Error : Oops, an error occurred! Code: 20160423130602aa65c6ca


In latest version of typo3 we got error message like : Oops, an error occurred! Code: 20160423130602aa65c6ca

Selection_006

That time we are completely scare what exactly error is

but don’t worry. we need to do disabled following configuration than its showing you proper error message.

config.contentObjectExceptionHandler = 0

After applying this typoscript error message will look like following image.

Selection_005

I hope it will work for you. if this will not work than please do clear your cache πŸ˜‰

If you have any queries, please do not hesitate to contact me at Jainish Senjaliya

How to access typoscript settings data in typo3 extension


How to access typoscript settings data or flexform setting data in typo3 extension

We can easily get setting data in controller file by using following code

$this->settings;

If we want to get that data in other files like repository, service that we need to use following code

$objectManager = \TYPO3\CMS\Core\Utility\GeneralUtility::makeInstance('TYPO3\\CMS\\Extbase\\Object\\ObjectManager');

$configurationManager = $objectManager->get('TYPO3\\CMS\\Extbase\\Configuration\\ConfigurationManagerInterface'); 

$setting = $configurationManager->getConfiguration(
    \TYPO3\CMS\Extbase\Configuration\ConfigurationManagerInterface::CONFIGURATION_TYPE_SETTINGS
);

Just print the $setting and you will get all typoscript settings data.

I hope above code will work for you and made your day πŸ˜‰ enjoy πŸ™‚

If you have any queries, please do not hesitate to contact me at Jainish Senjaliya

How to set custom label in index search extension of typo3.


Following typoscript will used for set label via typoscript for index search extension

 plugin.tx_indexedsearch._LOCAL_LANG.de{
      default_search_word_entry = Suche
      submit_button_label = Suchen
      opt_type_0 = Distinct word = Ganzes Wort
      opt_type_1 = Part of word = Ein Teil des Wortes
      opt_type_2 = First part of word = Erster Teil des Wortes
      opt_type_3 = Last part of word = Letzter Teil des Wortes
      opt_type_10 = Sounds like = Klingt wie
      opt_type_20 = Sentence = Satz
      opt_defOp_0 = Aller WΓΆrter (UND)
      opt_defOp_1 = Aller WΓΆrter (ODER)
      opt_sections_0 = Ganze Seite
      opt_sections_-1 = Nur diese Seite
      opt_sections_-2 = Top + level 1
      opt_sections_-3 = Level 2 and out
      opt_freeIndexUid_-1 = Alle, vermischt/gemischt
      opt_freeIndexUid_-2 = Alle, kategorisiert
      opt_freeIndexUid_0 = Seiten
      opt_freeIndexUid_header_-1 = Mixed categories = gemischte/vermischte Kategorien
      opt_freeIndexUid_header_0 = Website Pages
      opt_media_-1 = All media = Alle Medien
      opt_media_0 = Internal pages = Interne Seiten
      opt_media_-2 = Alle Externen
      opt_order_rank_flag = Weight/Frequency
      opt_order_rank_freq = Frequency = HΓ€ufigkeit
      opt_order_rank_first = Close to top
      opt_order_rank_count = Number of words = Anzahl der WΓΆrter
      opt_order_mtime = Date Modified = Datum bearbeitet
      opt_order_title = Document title = Dokumenttitel
      opt_order_crdate = Creation date = Erstelldatum
      opt_group_sections = Bereichhierarchie
      opt_group_flat = Flat list
      opt_lang_-1 = All languages = Alle Sprachen
      opt_lang_0 = Default = Voreinstellung
      opt_desc_0 = Highest first = HΓΆchstes/HΓΆchster zuerst
      opt_desc_1 = Lowest first = Niedrigstes/Niedrigster zuerst
      opt_RL1 = Level 1:
      opt_RL1ALL = All pages on level 1
      opt_RL2 = - Level 2:
      opt_RL2ALL = - All pages on level 2
      form_legend = Suchformular
      form_searchFor = Suche nach:
      form_extResume = Extended resume = Erweiterte Vorschau
      form_atATime = at a time = Zu einem Zeitpunkt
      form_orderBy = Order by: = Ordnen nach:
      form_fromSection = From section: = Aus dem Bereich
      form_freeIndexUid = Category: = Kategorie:
      form_searchIn = Search in: = Suche in:
      form_match = Match: = Übereinstimmung
      form_style = Style: = Stil:
      rules_header = Rules: = Regeln:
      rules_text = Only words with 2 or more characters are accepted = Das Wort muss 2 oder mehr Buchstaben enthalten
Max 200 chars total
Space is used to split words, "" can be used to search for a whole string (not indexed search then)
AND, OR and NOT are prefix words, overruling the default operator
+/|/- equals AND, OR and NOT as operators.
All search words are converted to lowercase.
      searchFor = Suche nach
      searchFor_or = or = oder
      searchFor_and = and = und
      searchFor_butNot = but not = aber nicht
      noResults = Keine Resultate.
      inSection = in the section = in dem Bereich
      inNsection = in %s section:
      inNsections = in %s sections:
      word_page = page
      word_pages = pages
      unnamedSection = Andere
      link_regularSearch = Regular search = normale Suche
      link_advancedSearch = Advanced search = erweiterte Suche
      res_path = Pfad
      res_modified = Überarbeitet
      res_created = Erstellt:
      res_size = Grâße
      res_noResume = Notiz: Keine ΓΌbereinstimmungen gefunden. Die Seitenvorschau kann nicht angezeigt werden.
      res_otherMatching = ΓΌbereinstimmende Seiten im gleichen Dokment:
      res_otherPageAsWell = INFO: There was another page indexed as well... Probably indexed with another or no usergroup.
      res_memberGroups = Require membership of group numbers %s
      pi_list_browseresults_prev = <>
      pi_list_browseresults_display = Zeige ###TAG_BEGIN###%s bis  %s###TAG_END### von  ###TAG_BEGIN###%s###TAG_END###
      local_operator_AND = AND = UND
      local_operator_OR = OR = ODER
      local_operator_NOT = NOT = NICHT
      makerating_addToCurrentSearch = Add to current search words = Zu den aktuellen SuchwΓΆrtern hinzufΓΌgen
      maketitle_matches = matches = ΓΌbereinstimmend / ΓΌbereinstimmende Ergebnisse
}

Above label is for german language.

if we want to change for other language like italy then we can use following script

plugin.tx_indexedsearch._LOCAL_LANG.it

Note : it is stand for language code

If you have any queries, please do not hesitate to contact me at Jainish Senjaliya

How to set class to image of tt_content element in typo3


Many time we need to add class to image of tt_content element.

Following script will help you for add class to image element or you can set your own style to image.

tt_content.image.20.1.params.cObject = CASE
tt_content.image.20.1.params.cObject {
  key.field = layout
  default = TEXT
  default.value = class="YOUR-CLASS-NAME"
}

OR 

tt_content.image.20.1.params.cObject = CASE
tt_content.image.20.1.params.cObject {
  key.field = layout
  default = TEXT
  default.value = style="display:block;"
}

Above script will help for set default class to image.

If we want to set some style to second image and third image then following script will help you more.

tt_content.image.20.1.params.cObject = CASE
tt_content.image.20.1.params.cObject {
  key.field = layout
  default = TEXT
  default.value = class="class1"
  1 = TEXT
  1.value = class="class2"
  2 = TEXT
  2.value = class="img-responsive"
}

It will also help you when we want to add class related with responsive layout.

I hope it will work for you and make your day πŸ˜‰

If you have any queries, please do not hesitate to contact me at Jainish Senjaliya

How to set condition based upon template selection in fluid flux templating + typo3


Some time we need to set condition based upon template selection in fluid flux templating

Following script will help you more.

[globalVar = TSFE:page|tx_fed_page_controller_action = js_fuxtemplate->NewsLetter]

  YOUR CODE WILL BE HERE../.

[end]

Note: 
tx_fed_page_controller_action is stand for field name
js_fuxtemplate is stand for extension name
NewsLetter is stand for template name which are assign inside template

we can set some condition based upon other page field

i hope it will make you more happy πŸ™‚

If you have any queries, please do not hesitate to contact me at Jainish Senjaliya

How to Prefix all links with a Base URI in typo3


Some time we need to add prefix baseurl in front of images or link

Followig script will help you for Prefix all links with a BASE URI scheme

config.absRefPrefix = https://jainishsenjaliya.wordpress.com/

Prefix all links with a “/” results in absolute link paths:

config.absRefPrefix = / 

Prefix all links with the path to a subdirectory

config.absRefPrefix = /sub-sites/

If you have any queries, please do not hesitate to contact me at Jainish Senjaliya

How to hide standard TYPO3 header


How to display only body content area in typo3 / Remove default html header with typoscript / How to disabled standard TYPO3 header

Some time we don’t need header section in typo3 that time following script will help you more.

config {
	# Off Standard TYPO3 Header 
	disableAllHeaderCode = 1
	 
	# More Configuration
	prefixLocalAnchors = all
	typolinkCheckRootline_noExtTarget = 1
	inlineStyle2TempFile = 0
	insertDmailerBoundaries = 1
	doctype = none
}

After applying this script in frontend only display html after body section.

I hope it will work for you πŸ™‚

If you have any queries, please do not hesitate to contact me at Jainish Senjaliya

How to replace class of typo3 content element.


In frontend many time we need to change class of element and some time we need to replace old class name with new class name

following script will help you for search any element from content and replacing with new element.

Here we have replace class of tt_content element [ table content element of typo3] with new class [ bootstrap class ]


tt_content.table.20.stdWrap.replacement {
  10 {
    search = class="contenttable 
    replace = data-role="table" class="table table-hover
  }
}

This is will you for bootstrap layout of table.

If you have any queries, please do not hesitate to contact me at Jainish Senjaliya

How do i change default header in TYPO3


Some time we need to change default header then we can easily change default header via following typoscript.

content.defaultHeaderType = 3

We have set defaultHeaderType is 3. its mean whenever we used default from header then it will render as h3 tag.

if we want to set default header as H2 tag then we can use simply 2 in defaultHeaderType

Like

content.defaultHeaderType = 2

I hope it will work for you πŸ™‚

If you have any queries, please do not hesitate to contact me at Jainish Senjaliya