Skip to content

Instantly share code, notes, and snippets.

@markblackmore
markblackmore / InteractiveLoginListener.php
Created May 12, 2015 14:20
Interactive Login Listener
<?php
namespace AgentWeb\EducationBundle\EventListener;
use eZ\Publish\API\Repository\UserService;
use eZ\Publish\Core\MVC\Symfony\Event\InteractiveLoginEvent;
use eZ\Publish\Core\MVC\Symfony\MVCEvents;
use Symfony\Component\EventDispatcher\EventSubscriberInterface;
use AgentWeb\EducationBundle\Entity\Teacher;
@markblackmore
markblackmore / error.log
Created July 5, 2014 10:49
error.log from running updatesearchindexsolr.php
[ Jul 04 2014 14:12:02 ] Unexpected error, the message was : dfs/mysqli DB error: MySQL server has gone away
SQL Query: SELECT * FROM ezdfsfile_cache WHERE name_hash=MD5('var/ezflow_site/cache/user-info/1/0/user-data-10.cache.php') in /path/to/ez/releases/20140704130709/ezpublish_legacy/kernel/private/classes/clusterfilehandlers/dfsbackends/mysqli.php on line 1233
[ Jul 04 2014 14:12:02 ] [] eZMySQLiDB:
Query error (1062): Duplicate entry '0h9jsesd97bog4kuk7rn7k99n3' for key 'PRIMARY'. Query: INSERT INTO ezsession ( session_key, expiration_time, data, user_id )
VALUES ( '0h9jsesd97bog4kuk7rn7k99n3', '1404738722', 'eZUserLoggedInID|i:10;', '10' )
[ Jul 04 2014 14:12:03 ] [] _fetchMetadata(var/ezflow_site/cache/user-info/1/0/user-data-10.cache.php):
Failed to retrieve file metadata: var/ezflow_site/cache/user-info/1/0/user-data-10.cache.php
2006: MySQL server has gone away
[ Jul 04 2014 14:12:03 ] Unexpected error, the message was : dfs/mysqli DB error: MySQL server has gone away
SQL Que
@markblackmore
markblackmore / gist:6668672
Created September 23, 2013 10:15
/src/AgentWeb/HarvestBundle/Resources/views/fields/blue_subheading_template.html.twig
{% block ezxmltext_field %}
{% spaceless %}
{% set field_value = field.value.xml|xmltext_to_html5|default( field.value ) %}
{{ field_value|raw }}
{% endspaceless %}
{% endblock %}
@markblackmore
markblackmore / data_text.xml
Created September 23, 2013 09:44
Contents of ezcontentobject_attribute.data_text
<?xml version="1.0" encoding="utf-8"?>
<section xmlns:image="http://ez.no/namespaces/ezpublish3/image/" xmlns:xhtml="http://ez.no/namespaces/ezpublish3/xhtml/" xmlns:custom="http://ez.no/namespaces/ezpublish3/custom/"><paragraph class="main_intro"><line xmlns:tmp="http://ez.no/namespaces/ezpublish3/temporary/">Click the map to choose a country. </line><line xmlns:tmp="http://ez.no/namespaces/ezpublish3/temporary/">Then play our game to make dinner with children just like you!</line></paragraph></section>
@markblackmore
markblackmore / gist:6667830
Last active December 23, 2015 17:19
/src/AgentWeb/HarvestBundle/Resources/views/full/harvest_home_page.html.twig
{% extends "AgentWebHarvestBundle::pagelayout.html.twig" %}
{% block wrapper_center %}
...
{{ ez_render_field( content, "blue_subheading", { 'template': 'AgentWebHarvestBundle:fields:blue_subheading_template.html.twig' }) }}
...
{% endblock %}
@markblackmore
markblackmore / content.ini.append.php
Created September 23, 2013 08:18
/ezpublish_legacy/settings/override/content.ini.append.php
<?php /* #?ini charset="utf-8"?
[CustomTagSettings]
AvailableCustomTags[]=underline
IsInline[underline]=true
[factbox]
CustomAttributes[]=align
CustomAttributes[]=title
CustomAttributesDefaults[align]=right
Last login: Sat Sep 14 18:04:51 on ttys001
Marks-MacBook-Pro:5.4.19 markblackmore$ brew install -v php54-intl 2>&1
==> Downloading http://www.php.net/get/php-5.4.19.tar.bz2/from/this/mirror
Already downloaded: /Library/Caches/Homebrew/php54-intl-5.4.19
tar xf /Library/Caches/Homebrew/php54-intl-5.4.19
==> /usr/local/Cellar/php54/5.4.19/bin/phpize
/usr/local/Cellar/php54/5.4.19/bin/phpize
Configuring for:
PHP Api Version: 20100412
Zend Module Api No: 20100525