<?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>Free Android CakePHP GMaps Articles</title>
	<atom:link href="http://www.balistupa.com/blog/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.balistupa.com/blog</link>
	<description>Bali Stupa Blog</description>
	<lastBuildDate>Wed, 14 Mar 2012 04:38:07 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.2</generator>
		<item>
		<title>Handling Error in Cakephp 2</title>
		<link>http://www.balistupa.com/blog/2012/03/handling-error-in-cakephp-2/</link>
		<comments>http://www.balistupa.com/blog/2012/03/handling-error-in-cakephp-2/#comments</comments>
		<pubDate>Wed, 14 Mar 2012 04:06:06 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[cakephp]]></category>

		<guid isPermaLink="false">http://www.balistupa.com/blog/?p=168</guid>
		<description><![CDATA[Cakephp is a good framework, it include many aspect of building a website fast. Handling error in cakephp 2 is easy, by default you can change template for all type of error inside folder app/Views/Errors (in prior version app/views/errors). You can create each template for each error, such as Http Error error400.ctp error404.ctp error500.ctp, etc [...]]]></description>
			<content:encoded><![CDATA[<p>Cakephp is a good framework, it include many aspect of building a website fast. Handling error in cakephp 2 is easy, by default you can change template for all type of error inside folder app/Views/Errors (in prior version app/views/errors). You can create each template for each error, such as</p>
<p><strong>Http Error</strong><br />
error400.ctp<br />
error404.ctp<br />
error500.ctp, etc</p>
<p><strong>Missing File</strong><br />
missing_action.ctp<br />
missing_component_class.ctp<br />
missing_component_file.ctp<br />
missing_connection.ctp<br />
missing_controller.ctp<br />
missing_helper_class.ctp<br />
missing_helper_file.ctp<br />
missing_layout.ctp<br />
missing_model.ctp<br />
missing_scaffolddb.ctp<br />
missing_table.ctp<br />
missing_view.ctp</p>
<p><strong><span id="more-168"></span>Private &amp; scaffold related errors</strong><br />
private_action.ctp<br />
scaffold_error.ctp</p>
<p># missing files #<br />
missing_action.ctp<br />
missing_component_class.ctp<br />
missing_component_file.ctp<br />
missing_connection.ctp<br />
missing_controller.ctp<br />
missing_helper_class.ctp<br />
missing_helper_file.ctp<br />
missing_layout.ctp<br />
missing_model.ctp<br />
missing_scaffolddb.ctp<br />
missing_table.ctp<br />
missing_view.ctp</p>
<p># private &amp; scaffold related errors #<br />
private_action.ctp<br />
scaffold_error.ctp</p>
<p><strong>How to Error handling in cakephp 2 for PHP errors</strong></p>
<p>In cakephp 2, error handling and exception handling are more better, the method cakeError now replaced by many built in Exception. So if you want to handle missing view etc, or any build in Exception, you need to check Exception handler setting. For PHP error that occured on view, we can handle it separately by using <em>Error</em> configuration.<strong></strong></p>
<p>To configure the error handling on php, open app/Config/core.php, find this line<br />
<code>Configure::write('Error', array(<br />
'handler' =&gt; 'ErrorHandler::handleError',<br />
'level' =&gt; E_ALL &amp; ~E_DEPRECATED,<br />
'trace' =&gt; true<br />
));<br />
</code><br />
<em>handler</em> is a callback function that handling the error on cakephp<br />
<em>level</em> is built-in php error constants<br />
<em>trace</em> true if you want to include trace message when displaying error message</p>
<p>If you want to handle the error in cakephp using your own class, create app/Lib/AppError.php<br />
<code>class AppError {<br />
public static function handleError($code, $description, $file = null, $line = null, $context = null) {<br />
echo 'There has been an error!';<br />
}<br />
}</code></p>
<p>and then add this line to app/Config/bootstrap.php to load the class<br />
<code>App::uses('AppError', 'Lib');</code></p>
<p>after that set app/Config/core.php<br />
<code>Configure::write('Error', array(<br />
'handler' =&gt; 'AppError::handleError',<br />
'level' =&gt; E_ALL &amp; ~E_DEPRECATED,<br />
'trace' =&gt; true<br />
));<br />
</code></p>
<p>You can set default error layout by create new error layout template in app/View/Layouts/error.ctp, otherwise it will use default layout to display error message.</p>
<p><strong>Handling Exception in cakephp 2</strong></p>
<p>First you need to know several built in exception in cakephp 2, such as BadRequestException, ForbiddenException, NotFoundException, etc. You can find complete list on <a href="http://book.cakephp.org/2.0/en/development/exceptions.html#built-in-exceptions">this link</a>.</p>
<p>take a look at app/Config/core.php<br />
<code>Configure::write('Exception', array(<br />
'handler' =&gt; 'ErrorHandler::handleException',<br />
'renderer' =&gt; 'ExceptionRenderer',<br />
'log' =&gt; true<br />
));</code></p>
<p>You can create custom exception handler in app/Lib/AppExceptionHandler.php<br />
<code>class AppExceptionHandler {<br />
    public static function handle($error) {<br />
        echo 'Oh noes! ' . $error-&gt;getMessage();<br />
        // ...<br />
    }<br />
    // ...<br />
}</code></p>
<p>and then add this line to app/Config/bootstrap.php<br />
<code>App::uses('AppExceptionHandler', 'Lib');</code></p>
<p>finally set your custom exception handler in app/Config/core.php<br />
<code>Configure::write('Exception.handler', 'AppExceptionHandler::handle');</code></p>
]]></content:encoded>
			<wfw:commentRss>http://www.balistupa.com/blog/2012/03/handling-error-in-cakephp-2/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>How to optimize prestashop</title>
		<link>http://www.balistupa.com/blog/2012/03/how-to-optimize-prestashop/</link>
		<comments>http://www.balistupa.com/blog/2012/03/how-to-optimize-prestashop/#comments</comments>
		<pubDate>Wed, 07 Mar 2012 05:58:14 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[prestashop]]></category>

		<guid isPermaLink="false">http://www.balistupa.com/blog/?p=165</guid>
		<description><![CDATA[Debugging mode and deploy mode must have different handling. When developing we need to enable debug mode to see warning or problem on our website before ready to launch. When all function are tested without error, we are ready to launch it and put it to deploy mode. This article is about how to optimize [...]]]></description>
			<content:encoded><![CDATA[<p>Debugging mode and deploy mode must have different handling. When developing we need to enable debug mode to see warning or problem on our website before ready to launch. When all function are tested without error, we are ready to launch it and put it to deploy mode. This article is about how to optimize prestashop on deploy mode.</p>
<p>There are several setting that you can use to maximize page load on prestashop, such as</p>
<ol>
<li>Enable Smarty Cache File<br />
Set force compile to off will make page load are faster. Always Force compile will slow down the page load, only enable when you do template changes</li>
<li>Enabled CCC Setting<br />
Enable this to CSS, Javascript, and HTML without touching your template will improve your website performance. It decrease server load by combine all CSS files into one file. Also this setting compress the file so the filesize is smaller make it faster to load.</li>
<li>Enable Cache System<br />
This is important, if you dont have memcached feature on your hosting, just use File system cache. This caching system significantly improve page load speed.</li>
</ol>
<p>Where you can find this setting to optimize prestashop? Just go to admin area, open menu Preferences &gt; Performance</p>
]]></content:encoded>
			<wfw:commentRss>http://www.balistupa.com/blog/2012/03/how-to-optimize-prestashop/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>How to edit seo title keyword description metatag homepage prestashop</title>
		<link>http://www.balistupa.com/blog/2012/03/how-to-edit-seo-title-keyword-description-metatag-homepage-prestashop/</link>
		<comments>http://www.balistupa.com/blog/2012/03/how-to-edit-seo-title-keyword-description-metatag-homepage-prestashop/#comments</comments>
		<pubDate>Wed, 07 Mar 2012 05:34:11 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[prestashop]]></category>

		<guid isPermaLink="false">http://www.balistupa.com/blog/?p=162</guid>
		<description><![CDATA[SEO is important when we want to optimize our website to gain more visitor from search engine result page. It is important to have unique title, keyword and description metatag for all your web pages. This way the search engine crawler will index better using this information. It is also important for prestashop to have [...]]]></description>
			<content:encoded><![CDATA[<p>SEO is important when we want to optimize our website to gain more visitor from search engine result page. It is important to have unique title, keyword and description metatag for all your web pages. This way the search engine crawler will index better using this information. It is also important for prestashop to have seo for homepage, however probably it is a bit confusing to set it on admin area.</p>
<p>I will tell you how to edit seo parameter for title, keyword and description metatag for your homepage or your other pages except products and categories. Please follow this step</p>
<ol>
<li>Go to admin area</li>
<li>Open Menu Preferences &gt; SEO &amp; URLs</li>
<li>And then edit index.php from the page list (url lists)</li>
<li>On next interface you will see input field for title, keyword and description metatag</li>
</ol>
<p>Using this way, you could change seo parameter for another pages, just find on the list and then edit it.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.balistupa.com/blog/2012/03/how-to-edit-seo-title-keyword-description-metatag-homepage-prestashop/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Strange error when configure module Module uninstalled successfully Prestashop</title>
		<link>http://www.balistupa.com/blog/2012/03/strange-error-when-configure-module-module-uninstalled-successfully-prestashop/</link>
		<comments>http://www.balistupa.com/blog/2012/03/strange-error-when-configure-module-module-uninstalled-successfully-prestashop/#comments</comments>
		<pubDate>Tue, 06 Mar 2012 08:44:11 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[prestashop]]></category>

		<guid isPermaLink="false">http://www.balistupa.com/blog/?p=160</guid>
		<description><![CDATA[I got strange error when Configure any module on prestashop Module menu. If i click Configure to any module that are installed, i will get this error message &#8220;Module uninstalled successfully&#8220;. I try to reset the module, and it work for a while when i click configure, but then when i save the configuration, it [...]]]></description>
			<content:encoded><![CDATA[<p>I got strange error when Configure any module on prestashop Module menu. If i click Configure to any module that are installed, i will get this error message &#8220;<strong>Module uninstalled successfully</strong>&#8220;. I try to reset the module, and it work for a while when i click configure, but then when i save the configuration, it showing that error again.</p>
<p>So i explore about this problem and found there is a bug that when we enable cache system, the system will showing that error message. So i do this step</p>
<ol>
<li>Go to Preferences &gt; Performance, and turn off Caching. I also turn off smarty cache and force to compile.</li>
<li>And then i configure the modules, and never get that strange message anymore</li>
</ol>
<p>I think the caching system need to fixed, because this caching system on prestashop often making strange behavior on the interface. If you find case like this just turn of caching system first. If everything has been setup then we can enable the caching system again for better performance on frontend</p>
]]></content:encoded>
			<wfw:commentRss>http://www.balistupa.com/blog/2012/03/strange-error-when-configure-module-module-uninstalled-successfully-prestashop/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>How to set confirmation email order prestashop</title>
		<link>http://www.balistupa.com/blog/2012/03/how-to-set-confirmation-email-order-prestashop/</link>
		<comments>http://www.balistupa.com/blog/2012/03/how-to-set-confirmation-email-order-prestashop/#comments</comments>
		<pubDate>Tue, 06 Mar 2012 08:36:34 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[prestashop]]></category>

		<guid isPermaLink="false">http://www.balistupa.com/blog/?p=157</guid>
		<description><![CDATA[By default prestashop will not send confirmation email order to sales or admin email. So we need to set first before we can get confirmation email order using prestashop. We know prestashop is quit complex CMS for ecommerce, that make setting much harder than others CMS. I use this procedure to get confirmation email order [...]]]></description>
			<content:encoded><![CDATA[<p>By default prestashop will not send confirmation email order to sales or admin email. So we need to set first before we can get confirmation email order using prestashop. We know prestashop is quit complex CMS for ecommerce, that make setting much harder than others CMS.</p>
<p>I use this procedure to get confirmation email order send to sales or admin email :</p>
<ol>
<li>Install Maill Alerts by Prestashop Module, and then configure. Place target confirmation email address on <strong>Send to these e-mail addresses</strong></li>
<li>Go to Employess &gt; Contacts, set email for Customer Service</li>
<li>Go to Preferences &gt; E-mail, set email to Customer Service</li>
</ol>
<p>By using that procedure my prestashop now can send confirmation email order to sales or admin email.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.balistupa.com/blog/2012/03/how-to-set-confirmation-email-order-prestashop/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>How to enable and disable PHPSESSID</title>
		<link>http://www.balistupa.com/blog/2012/02/how-to-enable-and-disable-phpsessid/</link>
		<comments>http://www.balistupa.com/blog/2012/02/how-to-enable-and-disable-phpsessid/#comments</comments>
		<pubDate>Tue, 14 Feb 2012 03:13:22 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[php-tips-basic]]></category>

		<guid isPermaLink="false">http://www.balistupa.com/blog/?p=153</guid>
		<description><![CDATA[For some case where the visitor cannot save cookie, we need to put it on the url. This is happen on some browser also that cannot save cookie, like i-mode in japan. It will be a big task to add PHPSESSID to all pages URL, so we can enable PHPSESSID using php script setting. ini_set('session.use_cookies', [...]]]></description>
			<content:encoded><![CDATA[<p>For some case where the visitor cannot save cookie, we need to put it on the url. This is happen on some browser also that cannot save cookie, like i-mode in japan. It will be a big task to add PHPSESSID to all pages URL, so we can enable PHPSESSID using php script setting.</p>
<p><code><br />
ini_set('session.use_cookies', 0);<br />
ini_set('session.use_only_cookies', 0);<br />
ini_set('session.use_trans_sid', 1);<br />
ini_set('session.name', 'PHPSESSID');<br />
ini_set('url_rewriter.tags', 'a=href,area=href,frame=src,input=src,form=,fieldset=');<br />
</code></p>
<p><span id="more-153"></span>or add to php.ini<br />
<code><br />
php_value session.use_cookies 0<br />
php_value session.use_only_cookies 0<br />
php_value session.use_trans_sid 1<br />
</code></p>
<p>And then for some reason also we need to disable PHPSESSID, for example to avoid duplicate content because off different session ID on the URL.</p>
<p>Here are how to disable PHPSESSID on URL<br />
<code><br />
php_value session.use_only_cookies 1<br />
php_value session.use_trans_sid 0<br />
</code></p>
<p>and to permanent redirect all previous link with PHPSESSID added to the url, use this php script</p>
<p><code><br />
$actualurl= 'http://'.$_SERVER['HTTP_HOST'].$_SERVER['REQUEST_URI'];<br />
$correcturl = 'http://www.balistupa.com/blog/';<br />
if ($correcturl != $actualurl) {<br />
header("HTTP/1.1 301 Moved Permanently");<br />
header("Location: " . $correcturl);<br />
exit();<br />
}<br />
</code></p>
<p>And then please check on google all URL that have PHPSESSID, get list of them and then make a page that linking to all URL that you want to permanently redirect. It is a bit hard the get rid after indexing by google, but we need to do that to remove all duplicate content.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.balistupa.com/blog/2012/02/how-to-enable-and-disable-phpsessid/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>How to add first column on existing table mysql</title>
		<link>http://www.balistupa.com/blog/2012/01/how-to-add-first-column-on-existing-table-mysql/</link>
		<comments>http://www.balistupa.com/blog/2012/01/how-to-add-first-column-on-existing-table-mysql/#comments</comments>
		<pubDate>Mon, 30 Jan 2012 04:42:15 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[query tips]]></category>

		<guid isPermaLink="false">http://www.balistupa.com/blog/?p=149</guid>
		<description><![CDATA[I am encountering problem to add increment column on existing table mysql database. The existing table has some columns except increment column. So now i need increment column, but i don&#8217;t want to put this column at the end of the table, this is not look good for me. So i check to mysql manual [...]]]></description>
			<content:encoded><![CDATA[<p>I am encountering problem to add increment column on existing table mysql database. The existing table has some columns except increment column. So now i need increment column, but i don&#8217;t want to put this column at the end of the table, this is not look good for me.</p>
<p>So i check to mysql manual and found interesting sintak, beside use AFTER column syntax, there is FIRST syntax. So the query is look like this</p>
<p><code>ALTER TABLE table_name ADD COLUMN `ID` INTEGER UNSIGNED NOT NULL AUTO_INCREMENT First,<br />
ADD PRIMARY KEY (`ID`);</code></p>
<p>I hope this article can help you to add first column on existing table mysql database server.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.balistupa.com/blog/2012/01/how-to-add-first-column-on-existing-table-mysql/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Saving Mysql Function Now on Cakephp</title>
		<link>http://www.balistupa.com/blog/2011/05/saving-mysql-function-now-on-cakephp/</link>
		<comments>http://www.balistupa.com/blog/2011/05/saving-mysql-function-now-on-cakephp/#comments</comments>
		<pubDate>Wed, 25 May 2011 08:45:53 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[cakephp]]></category>
		<category><![CDATA[php]]></category>

		<guid isPermaLink="false">http://www.balistupa.com/blog/?p=142</guid>
		<description><![CDATA[I think many cakephp programmer will get confuse when they want to save column/field on table with mysql function such as NOW(), CURDATE(), etc, We cannot use simple way of the saveField method or save method on model object. This code will not save the data field into current date time on mysql. $this-&#62;ModelName-&#62;saveField('date_field', 'NOW()'); [...]]]></description>
			<content:encoded><![CDATA[<p>I think many cakephp programmer will get confuse when they want to save column/field on table with mysql function such as NOW(), CURDATE(), etc, We cannot use simple way of the saveField method or save method on model object.</p>
<p>This code will not save the data field into current date time on mysql.</p>
<p><code>$this-&gt;ModelName-&gt;saveField('date_field', 'NOW()');</code></p>
<p>or</p>
<p><code>$data['ModelName']['id'] = 1;<br />
$data['ModelName']['date_field'] = 'NOW()';<br />
$this-&gt;ModelName-&gt;save($data);</code></p>
<p>It will not work as you want. Because cakephp will ada quote on the value.</p>
<p><span id="more-142"></span>So the solution is by using DboSource class. Here are the code look like to save table column with current data time on mysql.</p>
<p><code>$this-&gt;ModelName-&gt;saveField('date_field', DboSource::expression('NOW()'));</code></p>
<p>or</p>
<p><code>$data['ModelName']['id'] = 1;<br />
$data['ModelName']['date_field'] = DboSource::expression('NOW()');<br />
$this-&gt;ModelName-&gt;save($data);</code></p>
<p>I hope this article help you for saving mysql function now, curdate, etc on cakephp model object.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.balistupa.com/blog/2011/05/saving-mysql-function-now-on-cakephp/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>debug certificate expired android problem</title>
		<link>http://www.balistupa.com/blog/2011/01/debug-certificate-expired-android-problem/</link>
		<comments>http://www.balistupa.com/blog/2011/01/debug-certificate-expired-android-problem/#comments</comments>
		<pubDate>Mon, 31 Jan 2011 07:18:13 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[android]]></category>
		<category><![CDATA[java]]></category>

		<guid isPermaLink="false">http://www.balistupa.com/blog/?p=139</guid>
		<description><![CDATA[I got this error message on my android projects after upgrading eclipse and android sdk manager. But it probably not the thing that makes this problem. So i explored about this problem on google and found the solution, at least this is work for my eclipse. I am using windows Vista, here are my step [...]]]></description>
			<content:encoded><![CDATA[<p>I got this error message on my android projects after upgrading eclipse and android sdk manager. But it probably not the thing that makes this problem. So i explored about this problem on google and found the solution, at least this is work for my eclipse.</p>
<p>I am using windows Vista, here are my step to solve debug certificate expired android problem :</p>
<ol>
<li>Delete debug.keystore on C:\Users\{USER_PROFILE}\.android folder. For others operating system, you could check the path on eclipse. Please open menu <strong>Preferences &#8211; Android &#8211; Build &#8211; Default debug keystore</strong>.</li>
<li>On eclipse, Clean the projects ( Menu <strong>Projects</strong> &gt; <strong>Clean</strong> ). You probably need to restart your eclipse.</li>
</ol>
<p>I figure out this problem are because the certificate is expired. I wondering if this debug keystore is same as keystore that i create when i installing the Android SDK. I don&#8217;t know, but eclipse can generate it. It seem the certificate is expired in 365 days. I hope this article can help to solve this problem.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.balistupa.com/blog/2011/01/debug-certificate-expired-android-problem/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>strange id added on form create url cakephp</title>
		<link>http://www.balistupa.com/blog/2011/01/strange-id-added-on-form-create-url-cakephp/</link>
		<comments>http://www.balistupa.com/blog/2011/01/strange-id-added-on-form-create-url-cakephp/#comments</comments>
		<pubDate>Thu, 20 Jan 2011 02:18:30 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[cakephp]]></category>
		<category><![CDATA[php]]></category>

		<guid isPermaLink="false">http://www.balistupa.com/blog/?p=137</guid>
		<description><![CDATA[I found something strange on cakephp when i create form using FormHelper, a strange id appear on the action url. So i have this code on my view &#60;?php echo $form-&#62;create('Evoucher', array('url' =&#62; array('controller' =&#62; 'gift_vouchers', 'action' =&#62; 'buy', $giftVoucher['GiftVoucher']['amount'])));?&#62; It is generated a form tag with strange id added on action url. Something like [...]]]></description>
			<content:encoded><![CDATA[<p>I found something strange on cakephp when i create form using FormHelper, a strange id appear on the action url. So i have this code on my view</p>
<pre>&lt;?php echo $form-&gt;create('Evoucher', array('url' =&gt; array('controller' =&gt; 'gift_vouchers', 'action' =&gt; 'buy', $giftVoucher['GiftVoucher']['amount'])));?&gt;</pre>
<p>It is generated a form tag with strange id added on action url. Something like this</p>
<pre>&lt;form id="EvoucherBuyForm" method="post" action="/gift_vouchers/buy/2/20" accept-charset="utf-8"&gt;</pre>
<p>After exploration, i found the problem was on the controller action for buy. I have set id for the data variable</p>
<pre>$this-&gt;data['Evoucher']['id'] = 2;</pre>
<p>So after taking out this line, i change it into</p>
<pre>$this-&gt;Evoucher-&gt;id = 2;</pre>
<p>And cakephp can generate correct action url for the form tag</p>
<pre>&lt;form id="EvoucherBuyForm" method="post" action="/gift_vouchers/buy/20" accept-charset="utf-8"&gt;</pre>
<p>I hope this tutorial help you. Thanks for visiting our blog</p>
]]></content:encoded>
			<wfw:commentRss>http://www.balistupa.com/blog/2011/01/strange-id-added-on-form-create-url-cakephp/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

