Skip to content

Instantly share code, notes, and snippets.

list($childClass, $caller) = debug_backtrace(false, 2);
file_put_contents('./caller.log', $objectName . PHP_EOL . ' ' . $caller['class'] . '::' . $caller['function'] . PHP_EOL . ' ' . $childClass['file'] . ' (' . $childClass['line'] . ')' . PHP_EOL, FILE_APPEND);
@bnf
bnf / README.md
Last active December 11, 2017 13:32
TYPO3 init-remote.php

Usage

HEADS UP! It's important to add a trailing folder named "/repo". That folder is the deployment endpoint and is named "repo" by convention. The script will create folders /path/to/root/repo and /path/to/root/releases and a symlink /path/to/root/current pointing to the current version in the releases folder. That means when using a web-dir called "web" your webserver's document root needs to point to /path/to/root/current/web.

composer config extra.remote.production ssh://user@host:22/absolute/path/to/root/repo
php init-remote.php production
@bnf
bnf / README.md
Created September 8, 2017 19:32
typo3-console 4.8.0 dce incompatibility

During install:generatepackagestates typo3_console calls cache:flush which loads configuration from ext_localconf.php. DCE tries to generate caches when ext_localconf.php is loaded. They'll initializend initializes Output of composer install

$ php70 /usr/bin/composer install
Loading composer repositories with package information
Updating dependencies (including require-dev)
Package operations: 20 installs, 0 updates, 0 removals
  - Installing typo3/cms-composer-installers (1.4.2): Loading from cache
@bnf
bnf / TYPO3 EXT:canonical.md
Last active March 29, 2017 17:06
Canonical TYPO3

Requirements

  • ignore tracking parameter
    • equal to cHashExcludesParameters or more than those?
  • non yet translated pages => canonical to L=0
    • what should be done for plugins that render L=0 content (because l=1 not yet availble) on L=1 pages (canonical should theoretically point to L=0)
  • API: Usecases:
    • Plugins need to be able to define the canonical url of the current page, for e.g.
      • search page 10 may be set to be canonical to page 1
  • detail view in context of some category may be canonical to detail view without category
"use strict";
var $ = require('jquery');
$("#navbar.navbar-collapse")
.on('show.bs.collapse', function() {
var $navbar = $(this);
// TODO: Check whether we really need a backdrop (most probably for iphone)
if ('ontouchstart' in document.documentElement) {
// if mobile we use a backdrop because click events don't delegate