Its common to use clear:both style to push the parent container box to fit the height nicely.
It recent finding, realized when ever there is a float div above it, it will cause a huge white space to the container.
One way to fix it is to set the parent container: overflow: hidden
Thursday, June 28, 2012
Thursday, June 21, 2012
jquery e[h] not defined
jQuery("#formtargetname").submit() fail with e[h] error.
problem due to having a button or any field by the name "submit"
problem due to having a button or any field by the name "submit"
Sunday, June 3, 2012
Kloxo Roundcube unable to save to address book
Just faced this issue back 1 week ago, v 6.1.22 seems to face this issue on roundcube email.
upon further investigation into /var/log/httpd/error_log, found this:
PHP Notice: MDB2 Error: no such field Query: _doQuery: [Error message: Could not execute statement] [Last executed query: INSERT INTO contacts (user_id, changed, del, `vcard`, `name`, `email`, `words`) VALUES (1, now(), 0, 'BEGIN:VCARD\\r\\nVERSION:3.0\\r\\nFN:[name]\\r\\nEMAIL;type=INTERNET:name@example.com\\r\\nEND:VCARD', 'name', 'name@example.com', ' name@example.com name')] [Native code: 1054] [Native message: Unknown column 'words' in 'field list'] in /home/kloxo/httpd/webmail/roundcube/program/include/main.inc on line 2270, referer: ...
So, i went to dig into
/home/kloxo/httpd/webmail/roundcube/update/SQL/mysql.update.sql
And found these line which add the "word" column into the contacts table.
So i went to login as admin user into the kloxo and server > localhost > phpmyadmin,
and ran these script for roundcubemail database:
ALTER TABLE `contacts` ADD `words` TEXT NULL AFTER `vcard`;
ALTER TABLE `contacts` CHANGE `vcard` `vcard` LONGTEXT /*!40101 CHARACTER SET utf8 */ NULL DEFAULT NULL;
ALTER TABLE `contactgroupmembers` ADD INDEX `contactgroupmembers_contact_index` (`contact_id`);
And now it works perfectly.
Please take note not to run the entire file. You might likely to hit already ran sql syntax, and might took the risk to clear of your tables, especially message table.
upon further investigation into /var/log/httpd/error_log, found this:
PHP Notice: MDB2 Error: no such field Query: _doQuery: [Error message: Could not execute statement] [Last executed query: INSERT INTO contacts (user_id, changed, del, `vcard`, `name`, `email`, `words`) VALUES (1, now(), 0, 'BEGIN:VCARD\\r\\nVERSION:3.0\\r\\nFN:[name]\\r\\nEMAIL;type=INTERNET:name@example.com\\r\\nEND:VCARD', 'name', 'name@example.com', ' name@example.com name')] [Native code: 1054] [Native message: Unknown column 'words' in 'field list'] in /home/kloxo/httpd/webmail/roundcube/program/include/main.inc on line 2270, referer: ...
So, i went to dig into
/home/kloxo/httpd/webmail/roundcube/update/SQL/mysql.update.sql
And found these line which add the "word" column into the contacts table.
So i went to login as admin user into the kloxo and server > localhost > phpmyadmin,
and ran these script for roundcubemail database:
ALTER TABLE `contacts` ADD `words` TEXT NULL AFTER `vcard`;
ALTER TABLE `contacts` CHANGE `vcard` `vcard` LONGTEXT /*!40101 CHARACTER SET utf8 */ NULL DEFAULT NULL;
ALTER TABLE `contactgroupmembers` ADD INDEX `contactgroupmembers_contact_index` (`contact_id`);
And now it works perfectly.
Please take note not to run the entire file. You might likely to hit already ran sql syntax, and might took the risk to clear of your tables, especially message table.
Thursday, May 31, 2012
MySQL lock table and subqueries
MySQL complaints when a subqueries table / alias is not locked.
But Even if we lock the table by tablename, it will still complaint on the subquery table being not locked.
Example:
select n.node_id,
(select count(*) from node where node_aboveid=n.node_nextleftnodeid) as leftnextcnt,
(select count(*) from node where node_aboveid=n.node_nextrightnodeid) as rightnextcnt,
n.node_nextleftnodeid, n.node_nextleftdepth from
node n
To solve this issue,
Every sub select table must have a alias name, different from the main table name.
Example:
select n.node_id,
(select count(*) from node nleft where node_aboveid=n.node_nextleftnodeid) as leftnextcnt,
(select count(*) from node nright where node_aboveid=n.node_nextrightnodeid) as rightnextcnt,
n.node_nextleftnodeid, n.node_nextleftdepth from
node n
And makesure to lock tables node write, node n write, node nleft write, node nright write;
But Even if we lock the table by tablename, it will still complaint on the subquery table being not locked.
Example:
select n.node_id,
(select count(*) from node where node_aboveid=n.node_nextleftnodeid) as leftnextcnt,
(select count(*) from node where node_aboveid=n.node_nextrightnodeid) as rightnextcnt,
n.node_nextleftnodeid, n.node_nextleftdepth from
node n
To solve this issue,
Every sub select table must have a alias name, different from the main table name.
Example:
select n.node_id,
(select count(*) from node nleft where node_aboveid=n.node_nextleftnodeid) as leftnextcnt,
(select count(*) from node nright where node_aboveid=n.node_nextrightnodeid) as rightnextcnt,
n.node_nextleftnodeid, n.node_nextleftdepth from
node n
And makesure to lock tables node write, node n write, node nleft write, node nright write;
Tuesday, May 29, 2012
Magento deleting an order
It have been some argument about able to cancel or delete a processed or shipped or completed order.
But by end of the day, there are reasons that people want to delete the order.
Be it by mistake, or due to testing the order.
I finally found a extension which works with magento 1.6.2, but it does not cover properly for 1.6.2.
http://www.magentocommerce.com/magento-connect/seamless-delete-order.html
So i ended up altering the module block to support it.
http://www.mercstudio.net/assets/files/EM_DeleteOrder-1.0.5.tar.gz
But due to the nature of the reporting in magento, its not possible to delete the cached reports in the database using this extension.
It can only be deleted based on date, but becareful with this procedures.
The reporting tables for sales order are:
sales_order_aggregated_created
sales_invoiced_aggregated_order
sales_refunded_aggregated
sales_refunded_aggregated_order
sales_shipping_aggregated
But by end of the day, there are reasons that people want to delete the order.
Be it by mistake, or due to testing the order.
I finally found a extension which works with magento 1.6.2, but it does not cover properly for 1.6.2.
http://www.magentocommerce.com/magento-connect/seamless-delete-order.html
So i ended up altering the module block to support it.
http://www.mercstudio.net/assets/files/EM_DeleteOrder-1.0.5.tar.gz
But due to the nature of the reporting in magento, its not possible to delete the cached reports in the database using this extension.
It can only be deleted based on date, but becareful with this procedures.
The reporting tables for sales order are:
sales_order_aggregated_created
sales_invoiced_aggregated_order
sales_refunded_aggregated
sales_refunded_aggregated_order
sales_shipping_aggregated
Please note that i do not responsible for any data lost in the extension. So do the original developer himself. Please remember to backup your database in system > tools > backup before applying this extension and deleting any order.
Thursday, May 17, 2012
infinite loop in bootstrap module
It seems that if you want to develop a bootstrap for module,
you will need to extends Zend_Application_Module_Bootstrap
But how to get Layout from bootstrap_bootstrap?
$this->getApplication()->getResource("layout");
How to get view?
$this->getApplication()->getResource("layout")->getView();
What if i get undefined getView of a undefined object?
Yes, this problem is because layout and view bootstrap is not loaded in Zend_Application_Bootstrap_Bootstrap.
Makesure to run these in the class which extends bootstrap_bootstrap:
$this->bootstrap("View");
$this->bootstrap("layout");
you will need to extends Zend_Application_Module_Bootstrap
But how to get Layout from bootstrap_bootstrap?
$this->getApplication()->getResource("layout");
How to get view?
$this->getApplication()->getResource("layout")->getView();
What if i get undefined getView of a undefined object?
Yes, this problem is because layout and view bootstrap is not loaded in Zend_Application_Bootstrap_Bootstrap.
Makesure to run these in the class which extends bootstrap_bootstrap:
$this->bootstrap("View");
$this->bootstrap("layout");
Wednesday, May 16, 2012
tail cannot watch no space left
Ive been encountering this problem when i tried to tail a file using -f...
The problem is caused by inode watch limit. I suspect its due to the dropbox that ive installed.
To fix it, set fs.inotify.max_user_watches configuration to higher:
sudo sysctl -w fs.inotify.max_user_watches=16384
To fix it, set fs.inotify.max_user_watches configuration to higher:
sudo sysctl -w fs.inotify.max_user_watches=16384
Subscribe to:
Posts (Atom)