Skip to content

Instantly share code, notes, and snippets.

View sorenmalling's full-sized avatar

Søren Malling sorenmalling

View GitHub Profile
@sorenmalling
sorenmalling / gist:5f9f783ea8c3bbf639c4
Created April 14, 2015 12:53
Workspace module, "publish all"
#1: Catchable Fatal Error: Argument 1 passed to TYPO3\TYPO3CR\Domain\Model\AbstractNodeData::setLastPublicationDateTime() must be an instance of DateTime, instance of TYPO3\Flow\Object\DependencyInjection\DependencyProxy given, called in /Users/soren/Sites/typo3books/Data/Temporary/Development/Cache/Code/Flow_Object_Classes/TYPO3_TYPO3CR_Domain_Model_Workspace.php on line 267 and defined in /Users/soren/Sites/typo3books/Packages/Application/TYPO3.TYPO3CR/Classes/TYPO3/TYPO3CR/Domain/Model/AbstractNodeData.php line 380
Uncaught exception in line 116 of /Users/soren/Sites/typo3books/Packages/Libraries/doctrine/dbal/lib/Doctrine/DBAL/DBALException.php: An exception occurred while executing 'UPDATE typo3_typo3cr_domain_model_nodedata SET lastpublicationdatetime = ?, workspace = ?, lastmodificationdatetime = ?, version = version + 1 WHERE persistence_object_identifier = ? AND version = ?' with params ["2015-04-14 14:54:59", "live", "2015-04-14 14:55:00", "72e250ac-350e-407a-c11e-8f2b248d53be", 1]:
SQLSTATE[23000]: Integrity constraint violation: 1062 Duplicate entry '0a18d113225e042060e54b3ab15fea20-live-d751713988987e9331980363e2' for key 'UNIQ_60A956B92DBEC7578D94001992F8FB01'
26 Doctrine\DBAL\Driver\AbstractMySQLDriver::convertException("An exception occurred while executing 'UPDATE typo3_typo3cr_domain_model_nodedata SET lastpublicationdatetime = ?, workspace = ?, lastmodificationdatetime = ?, version = version + 1 WHERE persistence_object_identifier = ? AND version = ?' with params ["2015-04-14 14:54:59", "live", "2015-0
<?php
$GLOBALS['TCA']['tx_prisindeks_domain_model_index'] = array(
'ctrl' => $GLOBALS['TCA']['tx_prisindeks_domain_model_index']['ctrl'],
'interface' => array(
'showRecordFieldList' => 'hidden, name, entries',
),
'types' => array(
'1' => array('showitem' => 'hidden;;1, --palette--;;1, entries'),
),
@sorenmalling
sorenmalling / Settings.yaml
Created April 20, 2015 07:58
Pocketstore jsonview
Pocketstore:
Api:
view:
renderingConfigurations:
'store.show':
properties:
name:
property: 'name'
products:
property: 'products'
@sorenmalling
sorenmalling / Index.html
Last active November 9, 2017 14:06 — forked from jsegars/Index.html
<mypackage:link.node node="/sites/mysite/mypage">Click Me!</mypackage:link.node>
<?php
namespace Vendor\Project\Domain\Factory;
use Vendor\Project\Exception\AccountIdentifierAlreadyExistsException;
use TYPO3\Flow\Annotations as Flow;
use Vendor\Project\Domain\Model\User;
use TYPO3\Party\Domain\Model\ElectronicAddress;
source 'https://rubygems.org'
gem 'sass', '~> 3.4.0'
gem 'compass', '1.0.0'
@sorenmalling
sorenmalling / ItemViewhelper.php
Created June 3, 2015 14:13
A link viewhelper that can add a "active" class to a link
<?php
namespace Vendor\Namespace\ViewHelpers\Navigation;
use TYPO3\Fluid\ViewHelpers\Link\ActionViewHelper;
use TYPO3\Flow\Mvc\ActionRequest;
class ItemViewHelper extends ActionViewHelper {
public function render($action, $arguments = array(), $controller = NULL, $package = NULL, $subpackage = NULL, $section = '', $format = '', array $additionalParams = array(), $addQueryString = FALSE, array $argumentsToBeExcludedFromQueryString = array(), $useParentRequest = FALSE, $absolute = TRUE) {
if ($action === NULL || $controller === NULL || $package === NULL) {
@sorenmalling
sorenmalling / IncludeAssets.ts2
Last active August 29, 2015 14:24
Replacing TYPO3.TypoScript:Template with TYPO3.TypoScript:Array for body rendering
prototype(Vendor.Site:IncludeCss) < prototype(TYPO3.TypoScript:Tag) {
tagName = 'link'
attributes {
type = 'text/css'
rel = 'stylesheet'
href = TYPO3.TypoScript:ResourceUri
}
}
prototype(Vendor.Site:IncludeJs) < prototype(TYPO3.TypoScript:Tag) {
@sorenmalling
sorenmalling / commandline
Created September 17, 2015 08:45
Installing TYPO3 CMS 7.4 with composer and typo3_console
# Just read the help
soren@kevin  ~/Sites/typo3-hyttekort  ./typo3cms help install:setup
Alpha version of a setup command. Use with care and at your own risk!
COMMAND:
typo3_console:install:setup
USAGE:
/Users/soren/Sites/typo3-hyttekort/./typo3cms ./typo3cms install:setup [<options>]