<?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>Magento design, development and suport :: sonassi &#187; toolbar.phtml</title>
	<atom:link href="http://www.sonassi.com/tag/toolbar-phtml/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.sonassi.com</link>
	<description>Latest press releases, tutorials and thoughts on the world can be found here</description>
	<lastBuildDate>Wed, 18 Jan 2012 14:06:23 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0.4</generator>
		<item>
		<title>Magento 1.4 Install Errors</title>
		<link>http://www.sonassi.com/knowledge-base/magento-1-4-install-errors/</link>
		<comments>http://www.sonassi.com/knowledge-base/magento-1-4-install-errors/#comments</comments>
		<pubDate>Fri, 19 Feb 2010 22:08:37 +0000</pubDate>
		<dc:creator>Benjamin</dc:creator>
				<category><![CDATA[Knowledge Base]]></category>
		<category><![CDATA[Magento]]></category>
		<category><![CDATA[blank page after database]]></category>
		<category><![CDATA[Invalid argument supplied for foreach]]></category>
		<category><![CDATA[Invalid mode for clean]]></category>
		<category><![CDATA[magento 1.4 install errors]]></category>
		<category><![CDATA[There has been an error processing your request]]></category>
		<category><![CDATA[toolbar.phtml]]></category>
		<category><![CDATA[Unsupported operand types]]></category>
		<guid isPermaLink="false">http://www.sonassi.com/?p=1402</guid>
		<description><![CDATA[We imagine there is going to be a few, but here are the ones we have come across so far: 1 Unsupported operand types &#8230; Hostname.php Solution: Comment out line +471 in ./lib/Zend/Validate/Hostname.php #$regexChars += include($this-&#62;_validIdns[strtoupper($this-&#62;_tld)]); 2 Invalid mode for &#8230; <a href="http://www.sonassi.com/knowledge-base/magento-1-4-install-errors/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>We imagine there is going to be a few, but here are the ones we have come across so far:</p>
<ul class="opti optinoheight morepadding">
<li>
  <span class="yes">1</span></p>
<p>  <strong>Unsupported operand types &#8230; Hostname.php</strong><br />
  Solution: Comment out line +471 in <code>./lib/Zend/Validate/Hostname.php</code></p>
<div class="wp_syntax"><div class="code"><pre class="php" style="font-family:monospace;"><span style="color: #666666; font-style: italic;">#$regexChars += include($this-&gt;_validIdns[strtoupper($this-&gt;_tld)]);</span></pre></div></div>
</li>
<li>
  <span class="yes">2</span></p>
<p><strong>Invalid mode for clean</strong><br />
Solution: Remove <code>./app/code/core/Zend/Cache/</code>
</li>
<li>
  <span class="yes">3</span></p>
<p><strong>Invalid argument supplied for foreach &#8230; toolbar.phtml</strong><br />
This is due to a change of the way the pagination works, usually that the template is missing the relevant XML block to load and the subsquent PHP call</p>
<p>Solution: Create a new file <code>./template/catalog/product/list/pager.phtml</code> and enter</p>
<div class="wp_syntax"><div class="code"><pre class="php" style="font-family:monospace;"><span style="color: #000000; font-weight: bold;">&lt;?php</span> <span style="color: #b1b100;">if</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$this</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">getCollection</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">getSize</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">:</span> <span style="color: #000000; font-weight: bold;">?&gt;</span>
        <span style="color: #000000; font-weight: bold;">&lt;?php</span> <span style="color: #b1b100;">if</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$this</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">getLastPageNum</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">&gt;</span><span style="color: #cc66cc;">1</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">:</span> <span style="color: #000000; font-weight: bold;">?&gt;</span>
        &lt;td class=&quot;pages&quot;&gt;
            &lt;strong&gt;<span style="color: #000000; font-weight: bold;">&lt;?php</span> <span style="color: #b1b100;">echo</span> <span style="color: #000088;">$this</span><span style="color: #339933;">-&gt;</span>__<span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'Page:'</span><span style="color: #009900;">&#41;</span> <span style="color: #000000; font-weight: bold;">?&gt;</span>&lt;/strong&gt;
            &lt;ol&gt;
            <span style="color: #000000; font-weight: bold;">&lt;?php</span> <span style="color: #b1b100;">if</span> <span style="color: #009900;">&#40;</span><span style="color: #339933;">!</span><span style="color: #000088;">$this</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">isFirstPage</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">:</span> <span style="color: #000000; font-weight: bold;">?&gt;</span>
                &lt;li&gt;&lt;a href=&quot;<span style="color: #000000; font-weight: bold;">&lt;?php</span> <span style="color: #b1b100;">echo</span> <span style="color: #000088;">$this</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">getPreviousPageUrl</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span> <span style="color: #000000; font-weight: bold;">?&gt;</span>&quot;&gt;&lt;img src=&quot;<span style="color: #000000; font-weight: bold;">&lt;?php</span> <span style="color: #b1b100;">echo</span> <span style="color: #000088;">$this</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">getSkinUrl</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'images/pager_arrow_left.gif'</span><span style="color: #009900;">&#41;</span> <span style="color: #000000; font-weight: bold;">?&gt;</span>&quot; alt=&quot;<span style="color: #000000; font-weight: bold;">&lt;?php</span> <span style="color: #b1b100;">echo</span> <span style="color: #000088;">$this</span><span style="color: #339933;">-&gt;</span>__<span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'Previous Page'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span> <span style="color: #000000; font-weight: bold;">?&gt;</span>&quot; /&gt;&lt;/a&gt;&lt;/li&gt;
            <span style="color: #000000; font-weight: bold;">&lt;?php</span> <span style="color: #b1b100;">endif</span> <span style="color: #000000; font-weight: bold;">?&gt;</span>
            <span style="color: #000000; font-weight: bold;">&lt;?php</span> <span style="color: #b1b100;">foreach</span> <span style="color: #009900;">&#40;</span><span style="color: #000088;">$this</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">getPages</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span> <span style="color: #b1b100;">as</span> <span style="color: #000088;">$_page</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">:</span> <span style="color: #000000; font-weight: bold;">?&gt;</span>
                <span style="color: #000000; font-weight: bold;">&lt;?php</span> <span style="color: #b1b100;">if</span> <span style="color: #009900;">&#40;</span><span style="color: #000088;">$this</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">isPageCurrent</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$_page</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">:</span> <span style="color: #000000; font-weight: bold;">?&gt;</span>
                    &lt;li&gt;&lt;span class=&quot;on&quot;&gt;<span style="color: #000000; font-weight: bold;">&lt;?php</span> <span style="color: #b1b100;">echo</span> <span style="color: #000088;">$_page</span> <span style="color: #000000; font-weight: bold;">?&gt;</span>&lt;/span&gt;&lt;/li&gt;
                <span style="color: #000000; font-weight: bold;">&lt;?php</span> <span style="color: #b1b100;">else</span><span style="color: #339933;">:</span> <span style="color: #000000; font-weight: bold;">?&gt;</span>
                    &lt;li&gt;&lt;a href=&quot;<span style="color: #000000; font-weight: bold;">&lt;?php</span> <span style="color: #b1b100;">echo</span> <span style="color: #000088;">$this</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">getPageUrl</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$_page</span><span style="color: #009900;">&#41;</span> <span style="color: #000000; font-weight: bold;">?&gt;</span>&quot;&gt;<span style="color: #000000; font-weight: bold;">&lt;?php</span> <span style="color: #b1b100;">echo</span> <span style="color: #000088;">$_page</span> <span style="color: #000000; font-weight: bold;">?&gt;</span>&lt;/a&gt;&lt;/li&gt;
                <span style="color: #000000; font-weight: bold;">&lt;?php</span> <span style="color: #b1b100;">endif</span> <span style="color: #000000; font-weight: bold;">?&gt;</span>
            <span style="color: #000000; font-weight: bold;">&lt;?php</span> <span style="color: #b1b100;">endforeach</span><span style="color: #339933;">;;</span> <span style="color: #000000; font-weight: bold;">?&gt;</span>
            <span style="color: #000000; font-weight: bold;">&lt;?php</span> <span style="color: #b1b100;">if</span> <span style="color: #009900;">&#40;</span><span style="color: #339933;">!</span><span style="color: #000088;">$this</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">isLastPage</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">:</span> <span style="color: #000000; font-weight: bold;">?&gt;</span>
                &lt;li&gt;&lt;a href=&quot;<span style="color: #000000; font-weight: bold;">&lt;?php</span> <span style="color: #b1b100;">echo</span> <span style="color: #000088;">$this</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">getNextPageUrl</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span> <span style="color: #000000; font-weight: bold;">?&gt;</span>&quot;&gt;&lt;img src=&quot;<span style="color: #000000; font-weight: bold;">&lt;?php</span> <span style="color: #b1b100;">echo</span> <span style="color: #000088;">$this</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">getSkinUrl</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'images/pager_arrow_right.gif'</span><span style="color: #009900;">&#41;</span> <span style="color: #000000; font-weight: bold;">?&gt;</span>&quot; alt=&quot;<span style="color: #000000; font-weight: bold;">&lt;?php</span> <span style="color: #b1b100;">echo</span> <span style="color: #000088;">$this</span><span style="color: #339933;">-&gt;</span>__<span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'Next Page'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span> <span style="color: #000000; font-weight: bold;">?&gt;</span>&quot; /&gt;&lt;/a&gt;&lt;/li&gt;
            <span style="color: #000000; font-weight: bold;">&lt;?php</span> <span style="color: #b1b100;">endif</span> <span style="color: #000000; font-weight: bold;">?&gt;</span>
            &lt;/ol&gt;
        &lt;/td&gt;
        <span style="color: #000000; font-weight: bold;">&lt;?php</span> <span style="color: #b1b100;">endif</span><span style="color: #339933;">;</span> <span style="color: #000000; font-weight: bold;">?&gt;</span>
&nbsp;
<span style="color: #000000; font-weight: bold;">&lt;?php</span> <span style="color: #b1b100;">endif</span> <span style="color: #000000; font-weight: bold;">?&gt;</span></pre></div></div>
<p>Edit <code>./layout/catalog.xml</code> and <strong>add</strong>:</p>
<div class="wp_syntax"><div class="code"><pre class="xml" style="font-family:monospace;"><span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;block</span> <span style="color: #000066;">type</span>=<span style="color: #ff0000;">&quot;page/html_pager&quot;</span> <span style="color: #000066;">name</span>=<span style="color: #ff0000;">&quot;product_list_toolbar_pager&quot;</span> <span style="color: #000066;">template</span>=<span style="color: #ff0000;">&quot;catalog/product/list/pager.phtml&quot;</span> <span style="color: #000000; font-weight: bold;">/&gt;</span></span></pre></div></div>
<p><strong>Under</strong></p>
<div class="wp_syntax"><div class="code"><pre class="xml" style="font-family:monospace;"><span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;block</span> <span style="color: #000066;">type</span>=<span style="color: #ff0000;">&quot;catalog/product_list_toolbar&quot;</span> <span style="color: #000066;">name</span>=<span style="color: #ff0000;">&quot;product_list_toolbar&quot;</span> <span style="color: #000066;">template</span>=<span style="color: #ff0000;">&quot;catalog/product/list/toolbar.phtml&quot;</span><span style="color: #000000; font-weight: bold;">&gt;</span></span></pre></div></div>
<p>Then edit <code>./template/catalog/product/list/toolbar.phtml</code> and <strong>replace</strong> code between (and including) [approx. line 44 to line 63]</p>
<div class="wp_syntax"><div class="code"><pre class="php" style="font-family:monospace;"><span style="color: #000000; font-weight: bold;">&lt;?php</span> <span style="color: #b1b100;">if</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$this</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">getLastPageNum</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">&gt;</span><span style="color: #cc66cc;">1</span> <span style="color: #339933;">&amp;&amp;</span> <span style="color: #990000;">is_array</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$this</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">getPages</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">:</span> <span style="color: #000000; font-weight: bold;">?&gt;</span>
.....
<span style="color: #000000; font-weight: bold;">&lt;?php</span> <span style="color: #b1b100;">endif</span><span style="color: #339933;">;</span> <span style="color: #000000; font-weight: bold;">?&gt;</span></pre></div></div>
<p><strong>With:</strong></p>
<div class="wp_syntax"><div class="code"><pre class="php" style="font-family:monospace;"><span style="color: #000000; font-weight: bold;">&lt;?php</span> <span style="color: #b1b100;">echo</span> <span style="color: #000088;">$this</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">getPagerHtml</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span> <span style="color: #000000; font-weight: bold;">?&gt;</span></pre></div></div>
</li>
<li>
  <span class="yes">4</span></p>
<p><strong>During installation, blank page after database details</strong><br />
Solution: Albeit not a solution, more of a hack.</p>
<p>1) You get to the administrator stage and the page is blank<br />
2) Rename ./app/etc/local/xml to ./app/etc/local.xml.old<br />
3) Reload the page, and it the fields will appear.<br />
4) Restore ./app/etc/local.xml<br />
5) Fill in the fields as usual and click submit<br />
6) The next page will be blank, but the information will have saved correctly.
</li>
<li>
  <span class="yes">5</span></p>
<p><strong>There has been an error processing your request #1424782433 </strong><br />
Errors are hidden by default in 1.4, so you will need to open the file using command line or FTP.<br />
Solution: Open<code>./var/report/1424782433/</code> <strong>OR</strong><br />
If you are developing, add this to your .htaccess file</p>
<div class="wp_syntax"><div class="code"><pre class="php" style="font-family:monospace;">SetEnv MAGE_IS_DEVELOPER_MODE <span style="color: #0000ff;">&quot;true&quot;</span></pre></div></div>
</li>
</ul>
]]></content:encoded>
			<wfw:commentRss>http://www.sonassi.com/knowledge-base/magento-1-4-install-errors/feed/</wfw:commentRss>
		<slash:comments>21</slash:comments>
		</item>
	</channel>
</rss>

<!-- Performance optimized by W3 Total Cache. Learn more: http://www.w3-edge.com/wordpress-plugins/

Page Caching using disk (enhanced)
Database Caching 30/35 queries in 0.037 seconds using disk
Object Caching 2615/2625 objects using disk

Served from: www.sonassi.com @ 2012-02-10 14:34:01 -->
