iFrame von „fremder“ URL an Höhe des Inhalts anpassen

<iframe name="thetarget"
border ="0"

<script type="text/javascript">
var IFrameID = "thetarget";
var domain = "https://woher-auch-immer.com";
var path = "/de/";

window.onload = function(e) {
var theIframe = document.getElementById(IFrameID);
theIframe.src = domain + path + window.location.search;

function updateIFrame( height ) {
var theIframe = document.getElementById(IFrameID);
theIframe.setAttribute( 'height', height );

function receiveMessage(event) {
if (event.origin == domain) {
if(typeof event.data === "number") {
} else {
return false;

if (typeof window.addEventListener != "undefined") {
window.addEventListener("message", receiveMessage, false);

Dateien in Varnish invalidieren

Um in Varnish eine bestimmte Datei zu invalidieren, die bspw. unter mehreren URLs geliefert wird, kann man diese mittels „ban“-Befehl invalidieren.

varnishadm ban req.url '~' 'DATEINAME\\.zip$'

mySQL Aggregat-Funktion „PRODUCT()“

Um einen „Boost“-Faktor über mehrere Zeilen hinweg berechnen zu können, wird eine Aggregat-Funktion „PRODUCT()“ benötigt, die es in mySQL nicht gibt.

Mögliche SQL-Abfrage:
SELECT SUM(field) FROM table WHERE condition = true GROUP BY something;

Gewünschte SQL-Abfrage:
SELECT PRODUCT(field) FROM table WHERE condition = true GROUP BY something;

SELECT EXP(SUM(LOG(field))) FROM table WHERE condition = true GROUP BY something;

Die Lösung habe ich hier gefunden, wo sie auch nochmal genauer erklärt wird.

Row Data Multiplication in Oracle

TYPO3 Hooks



$GLOBALS ['TYPO3_CONF_VARS']['SC_OPTIONS']['t3lib/class.t3lib_tcemain.php']['processCmdmapClass']['extkey'] = \Vendor\Extension\Hook\Commandmap::class;
public function processCmdmap_preProcess($command, $table, $id, $value, \TYPO3\CMS\Core\DataHandling\DataHandler &$pObj) {}
public function processCmdmap_postProcess($command, $table, $id, $value, \TYPO3\CMS\Core\DataHandling\DataHandler &$pObj) {}
public function processCmdmap_deleteAction($table, $id, $recordToDelete, $recordWasDeleted=NULL, \TYPO3\CMS\Core\DataHandling\DataHandler &$pObj) {}


$GLOBALS ['TYPO3_CONF_VARS']['SC_OPTIONS']['t3lib/class.t3lib_tcemain.php']['processDatamapClass']['extkey'] = \Vendor\Extension\Hook\Datamap::class;
public function processDatamap_preProcessFieldArray(array &$fieldArray, $table, $id, \TYPO3\CMS\Core\DataHandling\DataHandler &$pObj) {}
public function processDatamap_postProcessFieldArray($status, $table, $id, array &$fieldArray, \TYPO3\CMS\Core\DataHandling\DataHandler &$pObj) {}
public function processDatamap_afterDatabaseOperations($status, $table, $id, array $fieldArray, \TYPO3\CMS\Core\DataHandling\DataHandler &$pObj) {}
public function processDatamap_afterAllOperations(\TYPO3\CMS\Core\DataHandling\DataHandler &;$pObj) {}

Change Solr password with cURL

To enable Solr password authentication create the following file:
(The path may be different on your system!)

{"authentication":{"blockUnknown":true,"class":"solr.BasicAuthPlugin","credentials":{"solr":"IV0EHq1OnNrj6gvRCwvFwTrZ1+z1oBbnQdiVC3otuq0= Ndd7LKvVBAaZIF0QAVi1ekCfAJXr1GGfLtRUXhgrF8c="},"":{"v":0}}}

Next run this cURL command:
Replace the „XXX“ by your new password.

curl --user solr:SolrRocks http://localhost:8983/solr/admin/authentication -H 'Content-type:application/json' -X POST -d '{"set-user": {"solr" : "XXXXXXXX"}}'

Language manager fails to update / Core update fails

Check if there´s a record in table „tx_extensionmanager_domain_model_repository“.

If there is no record run this statement:

INSERT INTO `tx_extensionmanager_domain_model_repository` (`uid`, `pid`, `title`, `description`, `wsdl_url`, `mirror_list_url`, `last_update`, `extension_count`) VALUES
(1, 0, 'TYPO3.org Main Repository', 'Main repository on typo3.org. This repository has some mirrors configured which are available with the mirror url.', 'https://typo3.org/wsdl/tx_ter_wsdl.php', 'https://repositories.typo3.org/mirrors.xml.gz', 0, 0);

Install Varnish with XKey on CentOS 7.x

#Install requirements
yum install autoconf automake jemalloc-devel libedit-devel libtool ncurses-devel pcre-devel pkgconfig python-docutils python-sphinx graphviz

#Download Varnish and install package
wget http://repo.varnish-cache.org/redhat/varnish-4.1/el7/x86_64/varnish/varnish-4.1.6-1.el7.x86_64.rpm
rpm -i varnish-4.1.6-1.el7.x86_64.rpm

#Download level-pack and install
wget http://repo.varnish-cache.org/redhat/varnish-4.1/el7/x86_64/varnish/varnish-devel-4.1.6-1.el7.x86_64.rpm
rpm -i varnish-devel-4.1.6-1.el7.x86_64.rpm

#Download modules and compile
wget https://github.com/varnish/varnish-modules/archive/master.zip
unzip master.zip
cd varnish-modules-master
make check
make install

Link to backend module

Build link to backend module

//Name of the module ($mainModuleName + '_' + $extensionName + $subModuleName)
$module_name = 'tools_GitsCacheStatus';
$url_parameters = array(
'tx_gitscache_tools_gitscachestatus' => array(
'controller' => 'Tag',
'action' => 'show',
'tag' => $tag
$uri = \TYPO3\CMS\Backend\Utility\BackendUtility::getModuleUrl($module_name, $url_parameters);

IP address

Get IP address of a user behind a proxy like e.g. nginx or Varnish.