Aprium Software

Drupal

Error in menu.inc on line 258

I have been having problems with the new menu system in Drupal 6. When editing my module menus an error started to appear which was "warning: Invalid argument supplied for foreach() in *****/includes/menu.inc on line 258". I first fixed this by rebuilding my menus which was done by adding the following code to the top of my index.php.

Theming a node from your modules dir

Im currently building a contractors book keeping module to store invoices. I have a new content type and I wanted to theme that new node type from a template in my modules directory. But I also wanted to allow the user to override the template with one in there theme directory if they wished.

After a while of trying different search terms in google I managed to find an article on the matter.

http://shellmultimedia.com/articles/hookthemeregistryalter-advanced-template-control

Drupal ecommerce shipping email

The drupal ecommerce solution has a problem with the shipping email. On a fresh install of version 3.x the 'shipping notify' option will throw the error message "Mail template for ec_mail_shipping_notification could not be found!". There is this support request on drupal.org that will fix it. Follow the link bellow and apply the patch from JohnAlbin, comment #4. http://drupal.org/node/162512 You should now have a default shipping drop down in the store options.

Drupal e-commerce clears cart regardless

The drupal ecommerce mode clears the contents of the cart when you enter the payment system. This is annoying because if a user fails the payment there shopping cart is emptied and may have taken a long time to create. I found this one a little hard to debug as it is actually an implementation of hook_ec_transactionapi in the cart itself. To fix this problem just go into the ecommerce module and comment out the line cart_empty in the cart_ec_transactionapi function. You will then need to clear the cart down yourself either in your payment gateway or payment success node.

Duplicate Id when adding new record

Drupal will cache the next available id for a table locally. This is not normally a problem, however when you have added data directly to the database it will throw a duplicate id. I think this caching is over kill but have not found a way of changing this behaver yet. A friend of mine had already come across this problem and sent me this SQL code which clears the cache completely.

delete from cache; 
delete from cache_page; 
delete from cache_filter; 
delete from cache_content; 
delete from cache_menu; 
delete from cache_views; 
delete from watchdog; 
Syndicate content

Hire

If you need a London based Drupal developer you can hire me. Check the availability page and contact me on info@aprium.net.

 

Powered by Drupal, an open source content management system

Copyright Aprium 2010