enzo's blog

Patch for CCK Fatal error: Cannot unset string offsets

Hello folks

Yesterday I got a freaking Fatal Error:
 

AttachmentSize
cck_unset_error.patch654 bytes

New Drupal Contribution: Webform Password Module

Hello folks

Today I pushed a new drupal module named webform password.

This module Provides a new Forms API element which is a password textfield element .

Module applications:

  • Webform login
  • Webform Register

Enjoy It.

enzo

Error importing CCK definition with FeedAPI

Hello folks

Today I was trying to export a CCK and import it to another Drupal Installation, but I was getting a freaking error "An illegal choice has been detected. Please contact the site administrator".

Guess what, I'm the administrator :P

Error importing CCK definition with Page Title

Hello folks

Today I was trying to export a CCK and import it to another Drupal Installation, but I was getting a freaking error "An illegal choice has been detected. Please contact the site administrator".

Guess what, I'm the administrator :P

After debugging the import process I realized the fail is because by default all content types in a Drupal Installation with module Page Title enabled, have the option "Show field" unchecked. if this option is unchecked the export process for CCK generates a code like this:
 

Move term and update url alias

Regards,

I've tested taxonomy manager and so far is a really useful module and it really makes things easy, however i am using pathauto as well, in order to make my urls look nicer.

AttachmentSize
urlalias-update.txt1.41 KB

Patch for Views SlideShow: SingleFrame Controls are rendered even if the slideshow doesn't have pagination

Hello folks

Today I realized that if I set the items per slide variable to SingleFrame and Set to YES the variable display controls, the controls are rendered even if the slideshow doesn't have pagination.

So after reviewing the code I detected in my perspective a bug in the logic.

Check the attached patch to validate that item_per_slide is lower than the rows available for the view.

enjoy IT.

enzo

How to force pager type in views for Drupal 6

Hello folks.

Today I'd a problem with attached views and the inherit pager feature, because the pager is inherited but not the style and I'd configured a mini pager. So my solution was to force that using the hook_views_pre_execute in a custom function listed below.
 

function YOURMODULE_views_pre_execute(&$view)
{    
    if($view->display[$view->current_display]->display_plugin == 'attachment'){
        $view->pager['use_pager'] = 'mini';
    }
}


Enjoy it.
enzo

How to execute Oracle Stored Procedures in PHP using OCI functions

Hello folks

Last week I had some troubles executing a Oracle Stored Procedure using PHP OCI functions, but the problem wasn't in the execution, the problem was in an OUT parameter type Oracle Cursor, when I tried to access the cursor I got the error "ORA-24374: define not done before fetch or execute and fetch " . The problem can be fixed if you execute the returned Oracle Cursor, I know it's weird but works :P.

Please see example below.
 

How to reset root users privileges in MySQL

Hello folks

If you are having problems with MySQL root user privileges, not related with password issues. I can understand your frustration, because you can connect to DB engine, but you can't do anything select/update etc.

Below you can find a short solution.

1. Stop your MySQL service

#/etc/init.d/mysqld stop (UNIX style)

2. Start your MySQL with privileges

#/usr/bin/mysqld_safe  --skip-grant-tables

3. Connect to mysql DB with your root user

How to Enable templates based in Path URL with Drupal 6

Hello folks

If you have been working with theming process in Drupal 6, you realize you can separate using type of content and other rules, but sometimes you need to create different templates just based in Path URLs, well if you need to use this approach, use the function listed below and copy it in your THEME's template.php file.
 

Pages

Subscribe to RSS - enzo's blog