Fatal error: Allowed memory size of 134217728 bytes exhausted (tried to allocate 83 bytes) in /typo3/sysext/core/Classes/Database/DatabaseConnection.php on line 1038 + TYPO3


Fatal error: Allowed memory size of 134217728 bytes exhausted (tried to allocate 83 bytes) in /typo3/sysext/core/Classes/Database/DatabaseConnection.php on line 1038 + TYPO3

Some time we are facing the issue of memory size exhausted in typo3 backend.

We are also facing “Allowed memory size of 134217728 bytes exhausted” issue while we save records in backend module.

Like : Edit page content, Powermail field data, News records or any other field data.

We can set memory limit in php.ini file as well. if we are not able to change on server file then we can also manage it from typo3 configuration.

Following script we have to set in “LocalConfiguration.php” OR you can directly set on the Install Tool set.

$TYPO3_CONF_VARS['SYS']['lockingMode'] = 'disable';

If this is not working for you then you can also set “setMemoryLimit” in your LocalConfiguration file.

$TYPO3_CONF_VARS['SYS']['setMemoryLimit'] = '16M';

Ie that 16 MB must use to run the script. Since it can then sometimes happen that the allocated 16 MB are not enough. so we can set it more from LocalConfiguration file and also manage it from install tool.

i hope it will work for you 🙂

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

Advertisements

How to remove controller and action from realurl + typo3 extbase


This is very important part for SEO Base URL. So we must need to short URL.

We can remove the controller or the action in the RealURL config.

Following should do the trick, which will removes both action and controller from a detail-link.

'faq' => array(
    array(
        'GETvar' => 'tx_jsfaq_faq[action]',
        'valueMap' => array(
            'detail' => '',
        ),
        'noMatch' => 'bypass'
    ),
    array(
        'GETvar' => 'tx_jsfaq_faq[controller]',
        'valueMap' => array(
            'detail' => '',
        ),
        'noMatch' => 'bypass'
    ),
    array(
        'GETvar' => 'tx_jsfaq_faq[faq]',
        'lookUpTable' => array(
            'table' => 'tx_jsfaq_domain_model_faq',
            'id_field' => 'uid',
            'alias_field' => 'question',
            'addWhereClause' => ' AND NOT deleted',
            'useUniqueCache' => 1,
            'useUniqueCache_conf' => array(
                'strtolower' => 1,
                'spaceCharacter' => '-',
                ),
            'autoUpdate' => 1,
        ),
    ),
),	

I hope this will help you more. nojy 😉

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

How to display table content in tab of typo3 extension


 
For display table content in tab of custom extension.

First you have to set “‘dividers2tabs’ => true” in exe_table.php file.

   'dividers2tabs' => true,

Dividers 2 tabs

Dividers 2 tabs


then after you have to modify tca.php file.

below code is original code of Tca file

'types' => array (
	'0' => array('showitem' => 'hidden;;1;;1-1-1, title;;;;2-2-2, images;;;;3-3-3, logo, small_image, address, place, types ')	
),

For set tab you have to add “–div–;Tab1,” before field name.

“Tab1” is stand for title of the tab. Below code is modified code

'types' => array (
	'0' => array('showitem' => '--div--;Tab1,hidden;;1;;1-1-1, title;;;;2-2-2, --div--;Tab2,images;;;;3-3-3, --div--;Tab3,logo, small_image,--div--;Tab4, address, place, --div--;Tab5,types ')
),
Tab in TCA

Tab in TCA

It will look like below image

TCA, Extension, table

TCA, Extension, table

I hope it will help you.. Good luck 🙂

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

How to add custom headers in TYPO3 backend


#Add this to page resource
Set below TypoScript Configuration in page edit porperty.

TCEFORM.tt_content.header_layout {
    addItems {
        10 = Gray Header
        11 = Orange Header
        12 = Red Header
    }
}
Custom header resource

Custom header resource

After set above TypoScript Configuration in page edit porperty. It will display in your “Type”
It will look like in below image.

Custom header in typo3

Custom header in typo3

If you want to wrap that section element with your HTML then you have to set below TypoScript

lib.stdheader.10.10 < lib.stdheader.10.1
lib.stdheader.10.10 {
  dataWrap = >h1 class="gray_header"<|>/h1<
}

lib.stdheader.10.11 < lib.stdheader.10.1
lib.stdheader.10.11 {
  dataWrap = <h1 class="orange_header">|</h1>
}

lib.stdheader.10.12 < lib.stdheader.10.1
lib.stdheader.10.12 {
  dataWrap = <h1 class="red_header">|</h1>
}

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

How to add color picker in TCA of TYPO3


 
For add color picker. you have to add below script on yout tca file.

‘config’ => array (
   ‘type’ => ‘input’,
   ‘size’ => 10,
   ‘wizards’ => array(
       ‘_PADDING’ => 2,
       ‘color’ => array(
           ‘title’ => ‘Color:’,
           ‘type’ => ‘colorbox’,
           ‘dim’ => ’16×12',
           ‘tableStyle’ => ‘border:solid 1px black;’,
           ‘script’ => ‘wizard_colorpicker.php’,
           ‘JSopenParams’ => ‘height=300,width=250,status=0,menubar=0,scrollbars=1',
      ),
   ),
)

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

Backend search not working for extensions in TYPO3 4.7 version


 
In previous TYPO3 versions, there were several problems with Backend search:

Basically, the ‘ctrl’ section of TCA is extended with a new option:

'searchFields' => 'username,email'

Edit ext_tables.php file in typo3conf/ext/yourext directory, find your table, and add to its ctrl section searchFields property as comma separated list of fields to search in:

$TCA['tx_yourext_table'] = array(
    'ctrl' => array(
        'title' => 'Title of your table',
        'label' => 'title',
        'tstamp' => 'tstamp',
        'crdate' => 'crdate',
         // etc...
        'searchFields' => 'title, other_field, yet_other_field',
    ),
);

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

How to add Section Frame and wrap section frame in TYPO3 backend


 
Add option in “Indentation and Frames”

If you want to add option in “Indentation and Frames” (section frame) then first you have to set TypoScript Configuration in page edit porperty

TCEFORM.tt_content.section_frame {
     addItems.101 = Contact Tabs
}  

After set above TypoScript Configuration in page edit porperty. It will display in your “Indentation and Frames”
It will look like in below image.

Section_frame

Section_frame

If you want to wrap that section element with your HTML then you have to set below TypoScript

tt_content.stdWrap.innerWrap.cObject = CASE
tt_content.stdWrap.innerWrap.cObject {
      key.field = section_frame
      101 = TEXT
      101.value = <div class="contact-tabs">|</div>    
} 

**Note : 101 is array key. you have to set common in page edit property and in TypoScript Configuration

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