<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>Two Drifters &#187; Concrete 5</title>
	<atom:link href="http://blog.ideaday.de/max/category/code/concrete-5/feed/" rel="self" type="application/rss+xml" />
	<link>http://blog.ideaday.de/max</link>
	<description>Off to see the world.</description>
	<lastBuildDate>Fri, 10 Feb 2012 19:07:45 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.1</generator>
		<item>
		<title>Concrete 5 SQL errors during installation</title>
		<link>http://blog.ideaday.de/max/2012/02/concrete-5-sql-errors-during-installation/</link>
		<comments>http://blog.ideaday.de/max/2012/02/concrete-5-sql-errors-during-installation/#comments</comments>
		<pubDate>Fri, 03 Feb 2012 19:57:24 +0000</pubDate>
		<dc:creator>Max</dc:creator>
				<category><![CDATA[Concrete 5]]></category>
		<category><![CDATA[English]]></category>
		<category><![CDATA[bug]]></category>
		<category><![CDATA[C5]]></category>
		<category><![CDATA[CMS]]></category>
		<category><![CDATA[code]]></category>
		<category><![CDATA[error]]></category>
		<category><![CDATA[explanation]]></category>
		<category><![CDATA[fix]]></category>
		<category><![CDATA[installation]]></category>
		<category><![CDATA[MySQL]]></category>
		<category><![CDATA[mysql error]]></category>
		<category><![CDATA[setup]]></category>
		<category><![CDATA[SQL]]></category>

		<guid isPermaLink="false">http://blog.ideaday.de/max/?p=1667</guid>
		<description><![CDATA[<div class="addthis_toolbox addthis_default_style " addthis:url='http://blog.ideaday.de/max/2012/02/concrete-5-sql-errors-during-installation/' addthis:title='Concrete 5 SQL errors during installation '  ><a class="addthis_button_facebook_like" fb:like:layout="button_count"></a><a class="addthis_button_tweet"></a><a class="addthis_button_google_plusone" g:plusone:size="medium"></a><a class="addthis_counter addthis_pill_style"></a></div>We have seen this error with Concrete 5.5.1 You try to setup Concrete 5, and get strange SQL errors during the installation: If installing with an empty site, like this you get: mysql error: [1048: Column 'uID' cannot be null] in EXECUTE("INSERT INTO Config (cfKey,cfValue,uID) VALUES ('NEWSFLOW_LAST_VIEWED','FIRSTRUN',NULL)") If installing with Sample content with Blog: The [...]<div class="addthis_toolbox addthis_default_style addthis_32x32_style" addthis:url='http://blog.ideaday.de/max/2012/02/concrete-5-sql-errors-during-installation/' addthis:title='Concrete 5 SQL errors during installation ' ><a class="addthis_button_preferred_1"></a><a class="addthis_button_preferred_2"></a><a class="addthis_button_preferred_3"></a><a class="addthis_button_preferred_4"></a><a class="addthis_button_compact"></a></div>]]></description>
			<content:encoded><![CDATA[<div class="addthis_toolbox addthis_default_style " addthis:url='http://blog.ideaday.de/max/2012/02/concrete-5-sql-errors-during-installation/' addthis:title='Concrete 5 SQL errors during installation '  ><a class="addthis_button_facebook_like" fb:like:layout="button_count"></a><a class="addthis_button_tweet"></a><a class="addthis_button_google_plusone" g:plusone:size="medium"></a><a class="addthis_counter addthis_pill_style"></a></div><p>We have seen this error with <strong>Concrete 5.5.1</strong></p>
<p>You try to setup Concrete 5, and get <strong>strange SQL errors</strong> during the installation:</p>
<p>If installing with an <strong>empty site</strong>, like this</p>
<p align="center"><a href="http://ideadayblog.ideaday.netdna-cdn.com/max/wp-content/uploads/2012/02/c5-nosample-content-chosen.png"><img hspace="10" alt="c5-nosample-content-chosen" vspace="10" src="http://ideadayblog.ideaday.netdna-cdn.com/max/wp-content/uploads/2012/02/c5-nosample-content-chosen-small.png" width="450" height="208" /></a></p>
<p>you get:</p>
<p align="center"><a href="http://ideadayblog.ideaday.netdna-cdn.com/max/wp-content/uploads/2012/02/c5-mysql-error.png"><img hspace="10" alt="c5-mysql-error" vspace="10" src="http://ideadayblog.ideaday.netdna-cdn.com/max/wp-content/uploads/2012/02/c5-mysql-error-small.png" width="450" height="129" /></a></p>
<p><em>mysql error: [1048: Column 'uID' cannot be null] in EXECUTE("INSERT INTO Config (cfKey,cfValue,uID) VALUES ('NEWSFLOW_LAST_VIEWED','FIRSTRUN',NULL)")</em></p>
<p>If installing with <strong>Sample content with Blog</strong>:</p>
<p align="center"><a href="http://ideadayblog.ideaday.netdna-cdn.com/max/wp-content/uploads/2012/02/c5_with_sample_content.png"><img hspace="10" alt="c5 with sample content" vspace="10" src="http://ideadayblog.ideaday.netdna-cdn.com/max/wp-content/uploads/2012/02/c5_with_sample_content-small.png" width="450" height="276" /></a></p>
<p>The error you get is:</p>
<p><em>Catchable fatal error: Argument 1 passed to ContentImporter::importPageAreas() must be an instance of Page, boolean given, called in /concrete/libraries/content/importer.php on line 75 and defined in /concrete/libraries/content/importer.php on line 197.</em></p>
<p>&nbsp;</p>
<p><strong>Solution:</strong></p>
<p>You don't run Varnish by any chance, do you? We do, and we had it set up to &#8230; dispose of some cookies. The solution is, in Varnish' case, to enable pass-through for the host you are installing on.</p>
<p>You want to enable cookies.</p>
<p>&nbsp;</p>
<p><strong>Explanation:</strong></p>
<p>The code which breaks is located in <em>concrete5.5.1\concrete\models\package\starting_point.php</em></p>
<blockquote>
<p>  Config::save('SITE', SITE);<br />
  Config::save('SITE_APP_VERSION', APP_VERSION);<br />
  $u = new User();<br />
  $u-&gt;saveConfig('NEWSFLOW_LAST_VIEWED', 'FIRSTRUN');</p>
</blockquote>
<p>As you see, this is the first time a User is created and used.</p>
<p>The User class is defined in <em>concrete5.5.1\concrete\models\user.php</em></p>
<blockquote>
<p> <strong> if (isset($_SESSION['uID'])) {<br /></strong>     $this-&gt;uID = $_SESSION['uID'];<br />
     $this-&gt;uName = $_SESSION['uName'];<br />
     $this-&gt;uTimezone = $_SESSION['uTimezone'];<br />
     if (isset($_SESSION['uDefaultLanguage'])) {<br />
      $this-&gt;uDefaultLanguage = $_SESSION['uDefaultLanguage'];<br />
     }<br />
     $this-&gt;superUser = ($_SESSION['uID'] == USER_SUPER_ID) ? true : false;<br />
    } else {<br />
    <strong> $this-&gt;uID = null;<br /></strong>     $this-&gt;uName = null;<br />
     $this-&gt;superUser = false;<br />
     $this-&gt;uDefaultLanguage = null;<br />
     $this-&gt;uTimezone = null;<br />
    }<br />
    $this-&gt;uGroups = $this-&gt;_getUserGroups();<br />
    if (!isset($args[2])) {<br />
     $_SESSION['uGroups'] = $this-&gt;uGroups;<br />
    }<br />
   }</p>
</blockquote>
<p>The constructor checks in the Session for a valid user ID. If no user ID is found, it is set to zero. This happens <strong>if you throw away the cookies</strong>! Because the session is stored in them.</p>
<p>HTH. Feel free to comment on similar errors and solutions.</p>
<div class="addthis_toolbox addthis_default_style addthis_32x32_style" addthis:url='http://blog.ideaday.de/max/2012/02/concrete-5-sql-errors-during-installation/' addthis:title='Concrete 5 SQL errors during installation ' ><a class="addthis_button_preferred_1"></a><a class="addthis_button_preferred_2"></a><a class="addthis_button_preferred_3"></a><a class="addthis_button_preferred_4"></a><a class="addthis_button_compact"></a></div>]]></content:encoded>
			<wfw:commentRss>http://blog.ideaday.de/max/2012/02/concrete-5-sql-errors-during-installation/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Redirection with Concrete 5</title>
		<link>http://blog.ideaday.de/max/2011/09/redirection-with-concrete-5/</link>
		<comments>http://blog.ideaday.de/max/2011/09/redirection-with-concrete-5/#comments</comments>
		<pubDate>Wed, 14 Sep 2011 10:26:44 +0000</pubDate>
		<dc:creator>Max</dc:creator>
				<category><![CDATA[Concrete 5]]></category>
		<category><![CDATA[English]]></category>
		<category><![CDATA[tech]]></category>
		<category><![CDATA[external link]]></category>
		<category><![CDATA[JavaScript]]></category>
		<category><![CDATA[problem solved]]></category>
		<category><![CDATA[solution]]></category>
		<category><![CDATA[trick]]></category>

		<guid isPermaLink="false">http://blog.ideaday.de/max/2011/09/redirection-with-concrete-5/</guid>
		<description><![CDATA[<div class="addthis_toolbox addthis_default_style " addthis:url='http://blog.ideaday.de/max/2011/09/redirection-with-concrete-5/' addthis:title='Redirection with Concrete 5 '  ><a class="addthis_button_facebook_like" fb:like:layout="button_count"></a><a class="addthis_button_tweet"></a><a class="addthis_button_google_plusone" g:plusone:size="medium"></a><a class="addthis_counter addthis_pill_style"></a></div>URL Shortening is all the rage now. Sometimes you want to give people ridiculously long URLs, which might also be subject to change. So you want to do it with C5, don't you? Great, you think &#8211; there's the "add external link" menu option in Concrete's sitemap. Unfortunately it does not work the way you [...]<div class="addthis_toolbox addthis_default_style addthis_32x32_style" addthis:url='http://blog.ideaday.de/max/2011/09/redirection-with-concrete-5/' addthis:title='Redirection with Concrete 5 ' ><a class="addthis_button_preferred_1"></a><a class="addthis_button_preferred_2"></a><a class="addthis_button_preferred_3"></a><a class="addthis_button_preferred_4"></a><a class="addthis_button_compact"></a></div>]]></description>
			<content:encoded><![CDATA[<div class="addthis_toolbox addthis_default_style " addthis:url='http://blog.ideaday.de/max/2011/09/redirection-with-concrete-5/' addthis:title='Redirection with Concrete 5 '  ><a class="addthis_button_facebook_like" fb:like:layout="button_count"></a><a class="addthis_button_tweet"></a><a class="addthis_button_google_plusone" g:plusone:size="medium"></a><a class="addthis_counter addthis_pill_style"></a></div><p>URL Shortening is all the rage now. Sometimes you want to give people ridiculously long URLs, which might also be subject to change.</p>
<p><strong>So you want to do it with C5, don't you?</strong></p>
<p>Great, you think &#8211; there's the "add external link" menu option in Concrete's sitemap. Unfortunately it does not work the way you expect it to &#8211; it just adds the link to the Navigation, but no page alias to point to the external page (i.e. <a href="http://www.synapse-redaktion.de/FaceBook">http://www.synapse-redaktion.de/FaceBook</a> won't work after adding a "FaceBook" external link).</p>
<p><strong>What to do to solve this dilemma?</strong></p>
<p>My suggestion is to use both: add a (hidden) page "FaceBook" which does header JavaScript forwarding to the other page, so you can give out the links to the people, and a "real external link" so you don't have to rely on JavaScript for most of your visitors.</p>
<p><strong>The SiteMap will look like this:</strong></p>
<p><img alt="sitemap" src="http://ideadayblog.ideaday.netdna-cdn.com/max/wp-content/uploads/2011/09/sitemap.jpg" width="412" height="534" /></p>
<p><strong>Adding custom attributes:</strong> (Header Extra Content, Exclude from Page List, Exclude from Nav)</p>
<p><img alt="header extra content" src="http://ideadayblog.ideaday.netdna-cdn.com/max/wp-content/uploads/2011/09/header_extra_content.jpg" width="450" height="346" /></p>
<p><strong>The page's setup:</strong></p>
<p><img alt="setup" src="http://ideadayblog.ideaday.netdna-cdn.com/max/wp-content/uploads/2011/09/setup.jpg" width="450" height="349" /></p>
<p><strong>The script is easy:</strong></p>
<blockquote>
<p>&lt;script type="text/javascript"&gt;<br />
&lt;!&#8211;<br />
window.location = "<a href="http://www.surfnext.com">http://www.surfnext.com</a>"<br />
//&#8211;&gt;<br />
&lt;/script&gt;</p>
</blockquote>
<p>with surfnext.com being the URL you are forwarding to.</p>
<p>If you have the time, you might want to add a static link or icon to the page (/*comment*/ the window.location = &#8230; part to be able to edit the page!) in case some person has their JavaScript turned off.</p>
<div class="addthis_toolbox addthis_default_style addthis_32x32_style" addthis:url='http://blog.ideaday.de/max/2011/09/redirection-with-concrete-5/' addthis:title='Redirection with Concrete 5 ' ><a class="addthis_button_preferred_1"></a><a class="addthis_button_preferred_2"></a><a class="addthis_button_preferred_3"></a><a class="addthis_button_preferred_4"></a><a class="addthis_button_compact"></a></div>]]></content:encoded>
			<wfw:commentRss>http://blog.ideaday.de/max/2011/09/redirection-with-concrete-5/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Privoxy rules to unblock Concrete 5 editing</title>
		<link>http://blog.ideaday.de/max/2011/05/privoxy-rules-to-unblock-concrete-5-editing/</link>
		<comments>http://blog.ideaday.de/max/2011/05/privoxy-rules-to-unblock-concrete-5-editing/#comments</comments>
		<pubDate>Fri, 20 May 2011 15:55:07 +0000</pubDate>
		<dc:creator>Max</dc:creator>
				<category><![CDATA[Concrete 5]]></category>
		<category><![CDATA[English]]></category>
		<category><![CDATA[tech]]></category>
		<category><![CDATA[content block]]></category>
		<category><![CDATA[fix]]></category>
		<category><![CDATA[Privoxy]]></category>
		<category><![CDATA[problem]]></category>

		<guid isPermaLink="false">http://blog.ideaday.de/max/2011/05/privoxy-rules-to-unblock-concrete-5-editing/</guid>
		<description><![CDATA[<div class="addthis_toolbox addthis_default_style " addthis:url='http://blog.ideaday.de/max/2011/05/privoxy-rules-to-unblock-concrete-5-editing/' addthis:title='Privoxy rules to unblock Concrete 5 editing '  ><a class="addthis_button_facebook_like" fb:like:layout="button_count"></a><a class="addthis_button_tweet"></a><a class="addthis_button_google_plusone" g:plusone:size="medium"></a><a class="addthis_counter addthis_pill_style"></a></div>In Concrete 5, TinyMCE is used as an editor for Content blocks. If you have Privoxy installed with the default settings, crucial parts of this editor will be blocked, and you would be unable to edit the Content block properly. (no editor appears, you see a small box with the HTML instead). You can verify [...]<div class="addthis_toolbox addthis_default_style addthis_32x32_style" addthis:url='http://blog.ideaday.de/max/2011/05/privoxy-rules-to-unblock-concrete-5-editing/' addthis:title='Privoxy rules to unblock Concrete 5 editing ' ><a class="addthis_button_preferred_1"></a><a class="addthis_button_preferred_2"></a><a class="addthis_button_preferred_3"></a><a class="addthis_button_preferred_4"></a><a class="addthis_button_compact"></a></div>]]></description>
			<content:encoded><![CDATA[<div class="addthis_toolbox addthis_default_style " addthis:url='http://blog.ideaday.de/max/2011/05/privoxy-rules-to-unblock-concrete-5-editing/' addthis:title='Privoxy rules to unblock Concrete 5 editing '  ><a class="addthis_button_facebook_like" fb:like:layout="button_count"></a><a class="addthis_button_tweet"></a><a class="addthis_button_google_plusone" g:plusone:size="medium"></a><a class="addthis_counter addthis_pill_style"></a></div><p>In Concrete 5, TinyMCE is used as an editor for Content blocks. If you have Privoxy installed with the default settings, crucial parts of this editor will be blocked, and you would be unable to edit the Content block properly. (no editor appears, you see a small box with the HTML instead).</p>
<p>You can verify that it's indeed Privoxy which is doing it, by checking the Network tab of Dragonfly or Firebug in Opera or FireFox, Privoxy will add a status message to files which have been blocked.</p>
<p>To fix this problem, edit your <strong>user.action</strong> file (located in the application's toplevel directory), and add a new line under the { fragile } section:</p>
<blockquote>
<p>{ fragile }<br />
#.forbes.com<br />
<strong>/concrete/js/tiny_mce/plugins/.*<br />
/updates/concrete.*</strong>
</p>
</blockquote>
<p>This should unblock all Concrete 5 &#8211; based sites.</p>
<p><b>Update (23.10.2011): The fix now works with updated Concrete 5 sites.</p>
<div class="addthis_toolbox addthis_default_style addthis_32x32_style" addthis:url='http://blog.ideaday.de/max/2011/05/privoxy-rules-to-unblock-concrete-5-editing/' addthis:title='Privoxy rules to unblock Concrete 5 editing ' ><a class="addthis_button_preferred_1"></a><a class="addthis_button_preferred_2"></a><a class="addthis_button_preferred_3"></a><a class="addthis_button_preferred_4"></a><a class="addthis_button_compact"></a></div>]]></content:encoded>
			<wfw:commentRss>http://blog.ideaday.de/max/2011/05/privoxy-rules-to-unblock-concrete-5-editing/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Developing with Concrete: New Block Type not showing up</title>
		<link>http://blog.ideaday.de/max/2010/11/developing-with-concrete-new-block-type-not-showing-up/</link>
		<comments>http://blog.ideaday.de/max/2010/11/developing-with-concrete-new-block-type-not-showing-up/#comments</comments>
		<pubDate>Wed, 17 Nov 2010 20:00:31 +0000</pubDate>
		<dc:creator>Max</dc:creator>
				<category><![CDATA[Concrete 5]]></category>
		<category><![CDATA[English]]></category>
		<category><![CDATA[development]]></category>
		<category><![CDATA[explanation]]></category>
		<category><![CDATA[fix]]></category>

		<guid isPermaLink="false">http://blog.ideaday.de/max/2010/11/developing-with-concrete-new-block-type-not-showing-up/</guid>
		<description><![CDATA[<div class="addthis_toolbox addthis_default_style " addthis:url='http://blog.ideaday.de/max/2010/11/developing-with-concrete-new-block-type-not-showing-up/' addthis:title='Developing with Concrete: New Block Type not showing up '  ><a class="addthis_button_facebook_like" fb:like:layout="button_count"></a><a class="addthis_button_tweet"></a><a class="addthis_button_google_plusone" g:plusone:size="medium"></a><a class="addthis_counter addthis_pill_style"></a></div>Problem: you are adding a new block type to your package. You are updating the package using Concrete's update functionality, but no new block type shows up. Solution: remove the package completely (uninstall &#8211; but leave it in the package directory, when C5 offers to move it to trash!), and install it again. Your block [...]<div class="addthis_toolbox addthis_default_style addthis_32x32_style" addthis:url='http://blog.ideaday.de/max/2010/11/developing-with-concrete-new-block-type-not-showing-up/' addthis:title='Developing with Concrete: New Block Type not showing up ' ><a class="addthis_button_preferred_1"></a><a class="addthis_button_preferred_2"></a><a class="addthis_button_preferred_3"></a><a class="addthis_button_preferred_4"></a><a class="addthis_button_compact"></a></div>]]></description>
			<content:encoded><![CDATA[<div class="addthis_toolbox addthis_default_style " addthis:url='http://blog.ideaday.de/max/2010/11/developing-with-concrete-new-block-type-not-showing-up/' addthis:title='Developing with Concrete: New Block Type not showing up '  ><a class="addthis_button_facebook_like" fb:like:layout="button_count"></a><a class="addthis_button_tweet"></a><a class="addthis_button_google_plusone" g:plusone:size="medium"></a><a class="addthis_counter addthis_pill_style"></a></div><p><strong>Problem:</strong> you are adding a new block type to your package. You are updating the package using Concrete's update functionality, but no new block type shows up.</p>
<p><strong>Solution:</strong> remove the package completely (uninstall &#8211; but leave it in the package directory, when C5 offers to move it to trash!), and install it again. Your block type should show up now.</p>
<div class="addthis_toolbox addthis_default_style addthis_32x32_style" addthis:url='http://blog.ideaday.de/max/2010/11/developing-with-concrete-new-block-type-not-showing-up/' addthis:title='Developing with Concrete: New Block Type not showing up ' ><a class="addthis_button_preferred_1"></a><a class="addthis_button_preferred_2"></a><a class="addthis_button_preferred_3"></a><a class="addthis_button_preferred_4"></a><a class="addthis_button_compact"></a></div>]]></content:encoded>
			<wfw:commentRss>http://blog.ideaday.de/max/2010/11/developing-with-concrete-new-block-type-not-showing-up/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Concrete 5 site is suddenly down</title>
		<link>http://blog.ideaday.de/max/2010/06/concrete-5-site-is-suddenly-down/</link>
		<comments>http://blog.ideaday.de/max/2010/06/concrete-5-site-is-suddenly-down/#comments</comments>
		<pubDate>Wed, 09 Jun 2010 18:54:20 +0000</pubDate>
		<dc:creator>Max</dc:creator>
				<category><![CDATA[Concrete 5]]></category>
		<category><![CDATA[English]]></category>
		<category><![CDATA[tech]]></category>

		<guid isPermaLink="false">http://blog.ideaday.de/max/2010/06/concrete-5-site-is-suddenly-down/</guid>
		<description><![CDATA[<div class="addthis_toolbox addthis_default_style " addthis:url='http://blog.ideaday.de/max/2010/06/concrete-5-site-is-suddenly-down/' addthis:title='Concrete 5 site is suddenly down '  ><a class="addthis_button_facebook_like" fb:like:layout="button_count"></a><a class="addthis_button_tweet"></a><a class="addthis_button_google_plusone" g:plusone:size="medium"></a><a class="addthis_counter addthis_pill_style"></a></div>The symptoms: Your site is suddenly down. If in production mode, a blank &#38; empty page is displayed. The solution: After checking that the MySQL daemon still works, Apache is running, PHP is working and the configuration has not been changed (a test.txt file is served correctly), you might want to look into your PHP [...]<div class="addthis_toolbox addthis_default_style addthis_32x32_style" addthis:url='http://blog.ideaday.de/max/2010/06/concrete-5-site-is-suddenly-down/' addthis:title='Concrete 5 site is suddenly down ' ><a class="addthis_button_preferred_1"></a><a class="addthis_button_preferred_2"></a><a class="addthis_button_preferred_3"></a><a class="addthis_button_preferred_4"></a><a class="addthis_button_compact"></a></div>]]></description>
			<content:encoded><![CDATA[<div class="addthis_toolbox addthis_default_style " addthis:url='http://blog.ideaday.de/max/2010/06/concrete-5-site-is-suddenly-down/' addthis:title='Concrete 5 site is suddenly down '  ><a class="addthis_button_facebook_like" fb:like:layout="button_count"></a><a class="addthis_button_tweet"></a><a class="addthis_button_google_plusone" g:plusone:size="medium"></a><a class="addthis_counter addthis_pill_style"></a></div><p><strong>The symptoms:</strong></p>
<p>Your site is suddenly down. If in production mode, a blank &amp; empty page is displayed.</p>
<p><strong>The solution:</strong></p>
<p>After checking that the MySQL daemon still works, Apache is running, PHP is working and the configuration has not been changed (a test.txt file is served correctly), you might want to look into your PHP error log.</p>
<p>Here's how you add PHP error logging to your .htaccess, if you do not have it already:</p>
<blockquote>
<p># php error logs..<br />
php_flag display_errors off<br />
php_flag log_errors on<br />
php_value track_errors on<br />
php_value error_log /path/to/php.error.log</p>
</blockquote>
<p>Be sure to chown the file to www-data:www-data or whatever your PHP process is running under.</p>
<p>In my case, the culprit was a very strange "duplicate entry" error:</p>
<blockquote>
<p>[09-Jun-2010 20:18:49] PHP Fatal error: Uncaught exception 'ADODB_Exception' with message 'mysql error: [1062: Duplicate entry '300969' for key 1] in EXECUTE("insert into PageStatistics (cID, uID, date) values ('1', 0, NOW())")<br />
' in /&#8230;/concrete5.4.0.5/concrete/libraries/3rdparty/adodb/adodb-exceptions.inc.php:78<br />
Stack trace:<br />
#0 /&#8230;/updates/concrete5.4.0.5/concrete/libraries/3rdparty/adodb/adodb.inc.php(1037): adodb_throw('mysql', 'EXECUTE', 1062, 'Duplicate entry&#8230;', 'insert into Pag&#8230;', false, Object(ADODB_mysql))<br />
#1 /&#8230;/concrete5.4.0.5/concrete/libraries/3rdparty/adodb/adodb.inc.php(993): ADOConnection-&gt;_Execute('insert into Pag&#8230;')<br />
#2 /&#8230;/updates/concrete5.4.0.5/concrete/libraries/3rdparty/adodb/adodb.inc.php(761): ADOConnection-&gt;Execute('insert into Pag&#8230;', Array)<br />
#3 [internal function]: ADOConnection-&gt;Query('insert into Pag&#8230;', Array)<br />
#4 /&#8230;/updates/concrete5.4.0.5/conc in /&#8230;/updates/concrete5.4.0.5/concrete/libraries/3rdparty/adodb/adodb-exceptions.inc.php on line 78</p>
</blockquote>
<p>After checking the appropriate table (used for logging visits to your C5 page), I could not understand the error &#8211; there was no entry for key 300969, the last entry was 300968.</p>
<p>Here's a quick way to turn off page statistics, which will fix this error and bring your site back on: Put this line o'code in your config/site.php</p>
<blockquote>
<p>define('STATISTICS_TRACK_PAGE_VIEWS', false);</p>
</blockquote>
<p>In PHPMyAdmin there's the option to manually increase the auto_increment value. I increased it by one to 300970 and the site was working again, with statistics (comment the line you just inserted.)</p>
<p>There's a couple of pages out there, currently having this problem (searching with Google helps). <a title="Lowcost Watchdog Service for C5 pages" href="http://www.ideaday.de/kontakt">I'm offering a low-cost watchdog service for Concrete5 sites</a> &#8211; <strong>be back up again before your visitors notice!</strong></p>
<div class="addthis_toolbox addthis_default_style addthis_32x32_style" addthis:url='http://blog.ideaday.de/max/2010/06/concrete-5-site-is-suddenly-down/' addthis:title='Concrete 5 site is suddenly down ' ><a class="addthis_button_preferred_1"></a><a class="addthis_button_preferred_2"></a><a class="addthis_button_preferred_3"></a><a class="addthis_button_preferred_4"></a><a class="addthis_button_compact"></a></div>]]></content:encoded>
			<wfw:commentRss>http://blog.ideaday.de/max/2010/06/concrete-5-site-is-suddenly-down/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Bug in Concrete 5</title>
		<link>http://blog.ideaday.de/max/2010/05/bug-in-concrete-5/</link>
		<comments>http://blog.ideaday.de/max/2010/05/bug-in-concrete-5/#comments</comments>
		<pubDate>Tue, 04 May 2010 20:39:04 +0000</pubDate>
		<dc:creator>Max</dc:creator>
				<category><![CDATA[Concrete 5]]></category>
		<category><![CDATA[English]]></category>

		<guid isPermaLink="false">http://blog.ideaday.de/max/2010/05/bug-in-concrete-5/</guid>
		<description><![CDATA[<div class="addthis_toolbox addthis_default_style " addthis:url='http://blog.ideaday.de/max/2010/05/bug-in-concrete-5/' addthis:title='Bug in Concrete 5 '  ><a class="addthis_button_facebook_like" fb:like:layout="button_count"></a><a class="addthis_button_tweet"></a><a class="addthis_button_google_plusone" g:plusone:size="medium"></a><a class="addthis_counter addthis_pill_style"></a></div>If a page name contains "/" (the slash), the Concrete5 edit bar does not appear on the page. (At least in Opera 10) Solution: go to the Dashboard, edit the page name (hint: remove the slash) from the Sitemap there and visit the page again.<div class="addthis_toolbox addthis_default_style addthis_32x32_style" addthis:url='http://blog.ideaday.de/max/2010/05/bug-in-concrete-5/' addthis:title='Bug in Concrete 5 ' ><a class="addthis_button_preferred_1"></a><a class="addthis_button_preferred_2"></a><a class="addthis_button_preferred_3"></a><a class="addthis_button_preferred_4"></a><a class="addthis_button_compact"></a></div>]]></description>
			<content:encoded><![CDATA[<div class="addthis_toolbox addthis_default_style " addthis:url='http://blog.ideaday.de/max/2010/05/bug-in-concrete-5/' addthis:title='Bug in Concrete 5 '  ><a class="addthis_button_facebook_like" fb:like:layout="button_count"></a><a class="addthis_button_tweet"></a><a class="addthis_button_google_plusone" g:plusone:size="medium"></a><a class="addthis_counter addthis_pill_style"></a></div><p><strong>If a page name contains "/" (the slash), the Concrete5 edit bar does not appear on the page.</strong> (At least in Opera 10)</p>
<p><strong>Solution:</strong> go to the Dashboard, edit the page name (hint: remove the slash) from the Sitemap there and visit the page again.</p>
<div class="addthis_toolbox addthis_default_style addthis_32x32_style" addthis:url='http://blog.ideaday.de/max/2010/05/bug-in-concrete-5/' addthis:title='Bug in Concrete 5 ' ><a class="addthis_button_preferred_1"></a><a class="addthis_button_preferred_2"></a><a class="addthis_button_preferred_3"></a><a class="addthis_button_preferred_4"></a><a class="addthis_button_compact"></a></div>]]></content:encoded>
			<wfw:commentRss>http://blog.ideaday.de/max/2010/05/bug-in-concrete-5/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>PDFGenerator for Concrete 5</title>
		<link>http://blog.ideaday.de/max/2010/05/pdfgenerator-for-concrete-5/</link>
		<comments>http://blog.ideaday.de/max/2010/05/pdfgenerator-for-concrete-5/#comments</comments>
		<pubDate>Sun, 02 May 2010 18:21:36 +0000</pubDate>
		<dc:creator>Max</dc:creator>
				<category><![CDATA[Concrete 5]]></category>
		<category><![CDATA[English]]></category>
		<category><![CDATA[tech]]></category>
		<category><![CDATA[package]]></category>
		<category><![CDATA[PDF]]></category>

		<guid isPermaLink="false">http://blog.ideaday.de/max/2010/05/pdfgenerator-for-concrete-5/</guid>
		<description><![CDATA[<div class="addthis_toolbox addthis_default_style " addthis:url='http://blog.ideaday.de/max/2010/05/pdfgenerator-for-concrete-5/' addthis:title='PDFGenerator for Concrete 5 '  ><a class="addthis_button_facebook_like" fb:like:layout="button_count"></a><a class="addthis_button_tweet"></a><a class="addthis_button_google_plusone" g:plusone:size="medium"></a><a class="addthis_counter addthis_pill_style"></a></div>After Georg (below) commented, I felt inspired to polish the code into usable Alpha state. IdeaDay PDF Generator (v3.0 Alpha) This Concrete 5 package encapsulates mpdf and makes it easy to create PDF versions of your pages. It was written by ideaday.de Contact: http://www.ideaday.de/kontakt mpdf was written by Ian Back (it makes itself heavy use [...]<div class="addthis_toolbox addthis_default_style addthis_32x32_style" addthis:url='http://blog.ideaday.de/max/2010/05/pdfgenerator-for-concrete-5/' addthis:title='PDFGenerator for Concrete 5 ' ><a class="addthis_button_preferred_1"></a><a class="addthis_button_preferred_2"></a><a class="addthis_button_preferred_3"></a><a class="addthis_button_preferred_4"></a><a class="addthis_button_compact"></a></div>]]></description>
			<content:encoded><![CDATA[<div class="addthis_toolbox addthis_default_style " addthis:url='http://blog.ideaday.de/max/2010/05/pdfgenerator-for-concrete-5/' addthis:title='PDFGenerator for Concrete 5 '  ><a class="addthis_button_facebook_like" fb:like:layout="button_count"></a><a class="addthis_button_tweet"></a><a class="addthis_button_google_plusone" g:plusone:size="medium"></a><a class="addthis_counter addthis_pill_style"></a></div><p><strong>After Georg (below) commented, I felt inspired to polish the code into usable Alpha state.</strong></p>
<h2>IdeaDay PDF Generator (v3.0 Alpha)</h2>
<p>This Concrete 5 package encapsulates mpdf and makes it easy to create PDF versions of your pages.<br />
It was written by <strong>ideaday.de</strong><br />
Contact: <a href="http://www.ideaday.de/kontakt">http://www.ideaday.de/kontakt</a></p>
<p>mpdf was written by Ian Back (it makes itself heavy use of other OSS projects).<br />
We use Version Version 4.4, released 24/03/10</p>
<p>See the other files for Licensing and Version information. (This blog entry is just a formatted README.txt)</p>
<h2>Download</h2>
<p>Get your package here:</p>
<ul>
<li>Download the newest version from my <a href="http://blog.ideaday.de/max/downloads/">download page</a></li>
</ul>
<h2>Installation</h2>
<p>1) download the ZIP<br />
2) unzip it<br />
3) upload the folder ideaday_pdf_generator in  your packages folder<br />
4) install it using the Dashboard</p>
<h2>Usage</h2>
<p>Add an Icon / link to the page(s) you want to generate the PDF from, including the query parameter <strong>?ipg_mode=pdf</strong><br />
i.e. http://www.example.com/this/is/a/page/?ipg_mode=pdf</p>
<p>Feel free to edit the default settings in /helpers/pdf.php:<br />
<em>$options['ipg_filename'] = 'website.pdf';<br />
$options['ipg_mode'] = 'I';<br />
$options['ipg_header'] = ";//'{PAGENO}'; //You could set up your own header here.<br />
$options['ipg_footer'] = ";</em></p>
<p>To modify the way the PDF is shown (streamed / forced download) you currently have to edit the line<br />
<em>$pdf-&gt;showPDF();</em><br />
and change it to the appropriate function.</p>
<h2>Functions</h2>
<p><strong>public function getHTML()</strong><br />
Returns the actual HTML used to build the PDF.</p>
<p><strong>public function getPDF()</strong><br />
Returns the PDF as a string.</p>
<p><strong>public function streamPDF()</strong><br />
Streams the PDF.</p>
<p><strong>public function showPDF()</strong><br />
Displays the PDF in the browser</p>
<h2>Known limitations</h2>
<ul>
<li>Floating images are rendered on top of the text instead floating beside it. If you specifically set the image size in pixels (IMG width / height), it will render correctly.</li>
<li>I have exposed only a very limited subset of the MPDF package, i.e. it renders in DIN A4, instead of letter, etc.</li>
<li>You have to add the icon/link, and tweak the source to change settings. I plan to add a block which will display a link and allow you to set up settings on each page individually.</li>
</ul>
<p><strong><br />
</strong></p>
<div class="addthis_toolbox addthis_default_style addthis_32x32_style" addthis:url='http://blog.ideaday.de/max/2010/05/pdfgenerator-for-concrete-5/' addthis:title='PDFGenerator for Concrete 5 ' ><a class="addthis_button_preferred_1"></a><a class="addthis_button_preferred_2"></a><a class="addthis_button_preferred_3"></a><a class="addthis_button_preferred_4"></a><a class="addthis_button_compact"></a></div>]]></content:encoded>
			<wfw:commentRss>http://blog.ideaday.de/max/2010/05/pdfgenerator-for-concrete-5/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Concrete5 does not update correctly?</title>
		<link>http://blog.ideaday.de/max/2010/04/concrete5-does-not-update-correctly/</link>
		<comments>http://blog.ideaday.de/max/2010/04/concrete5-does-not-update-correctly/#comments</comments>
		<pubDate>Fri, 30 Apr 2010 19:03:42 +0000</pubDate>
		<dc:creator>Max</dc:creator>
				<category><![CDATA[Concrete 5]]></category>
		<category><![CDATA[English]]></category>
		<category><![CDATA[tech]]></category>

		<guid isPermaLink="false">http://blog.ideaday.de/max/2010/04/concrete5-does-not-update-correctly/</guid>
		<description><![CDATA[<div class="addthis_toolbox addthis_default_style " addthis:url='http://blog.ideaday.de/max/2010/04/concrete5-does-not-update-correctly/' addthis:title='Concrete5 does not update correctly? '  ><a class="addthis_button_facebook_like" fb:like:layout="button_count"></a><a class="addthis_button_tweet"></a><a class="addthis_button_google_plusone" g:plusone:size="medium"></a><a class="addthis_counter addthis_pill_style"></a></div>Starting with the newest version of Concrete, 5.4, updates have been integrated into the web interface. For me, this update process suddenly did not work anymore correctly: After running the upgrade script, it would still show that we were using the old version of the code and offer to upgrade again &#8211; as if nothing [...]<div class="addthis_toolbox addthis_default_style addthis_32x32_style" addthis:url='http://blog.ideaday.de/max/2010/04/concrete5-does-not-update-correctly/' addthis:title='Concrete5 does not update correctly? ' ><a class="addthis_button_preferred_1"></a><a class="addthis_button_preferred_2"></a><a class="addthis_button_preferred_3"></a><a class="addthis_button_preferred_4"></a><a class="addthis_button_compact"></a></div>]]></description>
			<content:encoded><![CDATA[<div class="addthis_toolbox addthis_default_style " addthis:url='http://blog.ideaday.de/max/2010/04/concrete5-does-not-update-correctly/' addthis:title='Concrete5 does not update correctly? '  ><a class="addthis_button_facebook_like" fb:like:layout="button_count"></a><a class="addthis_button_tweet"></a><a class="addthis_button_google_plusone" g:plusone:size="medium"></a><a class="addthis_counter addthis_pill_style"></a></div><p>Starting with the newest version of Concrete, 5.4, updates have been integrated into the web interface.</p>
<p>For me, this update process suddenly did not work anymore correctly:<br />
<strong>After running the upgrade script, it would still show that we were using the old version of the code and offer to upgrade again &#8211; as if nothing had happened inbetween.</strong></p>
<p>The solution to this problem lies in your <strong>config/site.php</strong> &#8211; look at the very end of it, it will contain a statement similar to this one:</p>
<blockquote>
<p><em>&lt;?php define('DIRNAME_APP_UPDATED', 'concrete5.4.0.5');?&gt;</em></p>
</blockquote>
<p>My config/site.php contained two statements &#8211; one having the previous version, one the newest version of the update.</p>
<p>Try removing them both and running the upgrade once again. It will work this time &#8211; no upgrade will be offered again.</p>
<div class="addthis_toolbox addthis_default_style addthis_32x32_style" addthis:url='http://blog.ideaday.de/max/2010/04/concrete5-does-not-update-correctly/' addthis:title='Concrete5 does not update correctly? ' ><a class="addthis_button_preferred_1"></a><a class="addthis_button_preferred_2"></a><a class="addthis_button_preferred_3"></a><a class="addthis_button_preferred_4"></a><a class="addthis_button_compact"></a></div>]]></content:encoded>
			<wfw:commentRss>http://blog.ideaday.de/max/2010/04/concrete5-does-not-update-correctly/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Does the AdoDB C extension speed up Concrete?</title>
		<link>http://blog.ideaday.de/max/2010/04/does-the-adodb-c-extension-speed-up-concrete/</link>
		<comments>http://blog.ideaday.de/max/2010/04/does-the-adodb-c-extension-speed-up-concrete/#comments</comments>
		<pubDate>Tue, 06 Apr 2010 18:45:31 +0000</pubDate>
		<dc:creator>Max</dc:creator>
				<category><![CDATA[Concrete 5]]></category>
		<category><![CDATA[English]]></category>
		<category><![CDATA[tech]]></category>

		<guid isPermaLink="false">http://blog.ideaday.de/max/2010/04/does-the-adodb-c-extension-speed-up-concrete/</guid>
		<description><![CDATA[<div class="addthis_toolbox addthis_default_style " addthis:url='http://blog.ideaday.de/max/2010/04/does-the-adodb-c-extension-speed-up-concrete/' addthis:title='Does the AdoDB C extension speed up Concrete? '  ><a class="addthis_button_facebook_like" fb:like:layout="button_count"></a><a class="addthis_button_tweet"></a><a class="addthis_button_google_plusone" g:plusone:size="medium"></a><a class="addthis_counter addthis_pill_style"></a></div>My experiments with a sufficiently complex page (www.vitanit.com) have shown: no. There even may be a slight time penalty. To enable it, you'll have to download it, compile it, and add the following to your php.ini: extension=adodb.so How do you know that it's installed? phpinfo() will show something like: ADOdbInfo Extension requires ADOdb classes Download [...]<div class="addthis_toolbox addthis_default_style addthis_32x32_style" addthis:url='http://blog.ideaday.de/max/2010/04/does-the-adodb-c-extension-speed-up-concrete/' addthis:title='Does the AdoDB C extension speed up Concrete? ' ><a class="addthis_button_preferred_1"></a><a class="addthis_button_preferred_2"></a><a class="addthis_button_preferred_3"></a><a class="addthis_button_preferred_4"></a><a class="addthis_button_compact"></a></div>]]></description>
			<content:encoded><![CDATA[<div class="addthis_toolbox addthis_default_style " addthis:url='http://blog.ideaday.de/max/2010/04/does-the-adodb-c-extension-speed-up-concrete/' addthis:title='Does the AdoDB C extension speed up Concrete? '  ><a class="addthis_button_facebook_like" fb:like:layout="button_count"></a><a class="addthis_button_tweet"></a><a class="addthis_button_google_plusone" g:plusone:size="medium"></a><a class="addthis_counter addthis_pill_style"></a></div><p>My experiments with a sufficiently complex page (<a href="http://www.vitanit.com">www.vitanit.com</a>) have shown: no. There even may be a slight time penalty.</p>
<p>To enable it, you'll have to download it, compile it, and add the following to your php.ini:</p>
<blockquote>
<p>extension=adodb.so</p>
</blockquote>
<p>How do you know that it's installed? phpinfo() will show something like:</p>
<blockquote>
<p>ADOdbInfo  Extension requires ADOdb classes<br />
Download  <a href="http://php.weblogs.com/adodb">http://php.weblogs.com/adodb</a><br />
API Version  5.04</p>
</blockquote>
<p>It might be useful for the IdeaDay Import Wizard &#8211; which relies heavily on the database.</p>
<div class="addthis_toolbox addthis_default_style addthis_32x32_style" addthis:url='http://blog.ideaday.de/max/2010/04/does-the-adodb-c-extension-speed-up-concrete/' addthis:title='Does the AdoDB C extension speed up Concrete? ' ><a class="addthis_button_preferred_1"></a><a class="addthis_button_preferred_2"></a><a class="addthis_button_preferred_3"></a><a class="addthis_button_preferred_4"></a><a class="addthis_button_compact"></a></div>]]></content:encoded>
			<wfw:commentRss>http://blog.ideaday.de/max/2010/04/does-the-adodb-c-extension-speed-up-concrete/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Concrete5 File Uploads with Forms</title>
		<link>http://blog.ideaday.de/max/2010/04/concrete5-file-uploads-with-forms/</link>
		<comments>http://blog.ideaday.de/max/2010/04/concrete5-file-uploads-with-forms/#comments</comments>
		<pubDate>Sun, 04 Apr 2010 18:53:50 +0000</pubDate>
		<dc:creator>Max</dc:creator>
				<category><![CDATA[Concrete 5]]></category>
		<category><![CDATA[tech]]></category>

		<guid isPermaLink="false">http://blog.ideaday.de/max/2010/04/concrete5-file-uploads-with-forms/</guid>
		<description><![CDATA[<div class="addthis_toolbox addthis_default_style " addthis:url='http://blog.ideaday.de/max/2010/04/concrete5-file-uploads-with-forms/' addthis:title='Concrete5 File Uploads with Forms '  ><a class="addthis_button_facebook_like" fb:like:layout="button_count"></a><a class="addthis_button_tweet"></a><a class="addthis_button_google_plusone" g:plusone:size="medium"></a><a class="addthis_counter addthis_pill_style"></a></div>If you use Form Helpers and add a file upload there's a gotcha, which can drive you insane if you don't know about it: The form encoding type has to be set to multipart, like this: &#60;form method="post" enctype="multipart/form-data" action="&#60;?php echo $this-&#62;action('submit')?&#62;"&#62; If you don't do this, your file will never turn up, and you [...]<div class="addthis_toolbox addthis_default_style addthis_32x32_style" addthis:url='http://blog.ideaday.de/max/2010/04/concrete5-file-uploads-with-forms/' addthis:title='Concrete5 File Uploads with Forms ' ><a class="addthis_button_preferred_1"></a><a class="addthis_button_preferred_2"></a><a class="addthis_button_preferred_3"></a><a class="addthis_button_preferred_4"></a><a class="addthis_button_compact"></a></div>]]></description>
			<content:encoded><![CDATA[<div class="addthis_toolbox addthis_default_style " addthis:url='http://blog.ideaday.de/max/2010/04/concrete5-file-uploads-with-forms/' addthis:title='Concrete5 File Uploads with Forms '  ><a class="addthis_button_facebook_like" fb:like:layout="button_count"></a><a class="addthis_button_tweet"></a><a class="addthis_button_google_plusone" g:plusone:size="medium"></a><a class="addthis_counter addthis_pill_style"></a></div><p>If you use Form Helpers and add a file upload there's a gotcha, which can drive you insane if you don't know about it:</p>
<p><strong>The form encoding type has to be set to multipart, like this:</strong></p>
<blockquote>
<p>&lt;form method="post" enctype="multipart/form-data" action="&lt;?php echo $this-&gt;action('submit')?&gt;"&gt;</p>
</blockquote>
<p>If you don't do this, your file will never turn up, and you will be debugging like mad and not understanding where the problem is :-)</p>
<div class="addthis_toolbox addthis_default_style addthis_32x32_style" addthis:url='http://blog.ideaday.de/max/2010/04/concrete5-file-uploads-with-forms/' addthis:title='Concrete5 File Uploads with Forms ' ><a class="addthis_button_preferred_1"></a><a class="addthis_button_preferred_2"></a><a class="addthis_button_preferred_3"></a><a class="addthis_button_preferred_4"></a><a class="addthis_button_compact"></a></div>]]></content:encoded>
			<wfw:commentRss>http://blog.ideaday.de/max/2010/04/concrete5-file-uploads-with-forms/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
	</channel>
</rss>

<!-- Performance optimized by W3 Total Cache. Learn more: http://www.w3-edge.com/wordpress-plugins/

Minified using disk: basic
Page Caching using disk: enhanced
Database Caching 1/45 queries in 0.028 seconds using disk: basic
Object Caching 1087/1188 objects using disk: basic
Content Delivery Network via ideadayblog.ideaday.netdna-cdn.com

Served from: blog.ideaday.de @ 2012-02-10 22:48:43 -->
