locale module after enabling error

I installed drupal 7.4 on a shared webhosting.
during installation, I got the following messages:

The installation has encountered an error.
Please continue to the error page

Running db_query within t() function

I am trying to allow users to customize titles, descriptions, default values, etc. for form elements within the Form API. In order to implement it, I'm running a db_query within the t() function as shown in the '#title' element (code shown below). The database table name is v01_fielddata, the title value is stored in label_default and the primary key for the record is field_id and for this row, 'v01_price' is the field_id. The form rendered when variable_get was used (as shown in #default_value), so I don't believe I have a problem with the form itself. label_default is defined as a text field within the database, with a utf8_general_ci collation. I've confirmed that there is a text string within the column of that database row.

function v01_fields ($form, &$form_submit) {
$form['v01_price'] = array(
'#title' => t('%v01_price_title', array('%v01_price_title' => db_query('SELECT label_default FROM {v01_fielddata} WHERE field_id = :field_id', array(':field_id' => 'v01_price')))),
'#type' => 'textfield',
'#field_prefix' => t('$'),
'#default_value' => variable_get('v01_price', 25000),
'#maxlength' => 25,
'#size' => 20,
'#description' => t('The price you pay for your vehicle after extras and upgrades'),
);

When the form loads, I get the following error message:

preprocess_page

in template.php

I have the following... let's say my theme is 'foo' (sorry for the lack of originality)

function foo_preprocess_page(&$vars) {
$vars['test'] = 'hello';
}

In page.tpl.php I have

print $test;

Isn't this supposed to print 'hello'?

I get an Undefined variable error. Yes I emptied the cache. There must be a really obvious error here. What am I doing wrong?

Does a "social authentication" module exists for posting comments on nodes?

Hi everyone. I hope i didn't mess up with the sections and i chose the right one.
I was looking for a good method to manage comments on my "to be" personal site. I'd like to allow the user to authenticate trough social networks (like facebook or twitter) to post their comments to my blog entries or pages in general without actually let them create a new account as website users.
Is there a module that does this?
I ask because i couldn't find anything and still i found it for Wordpress. I don't know the name of the module but i just saw it implemented on a website.

getting 416 error code

Hi I am developing a module to process video files and stream it.. on amazon..

I save the videos first and then via ajax call stream it to amazon..But the call breaks with error code 416 which on google says its request range not satisfiable,

I guess this mostly comes with chrome browser..

Can any one suggest what and where can this issue be looked upon ?

I am using creeper module to stream this which provides me a amazon api

Thanks
sanjeev

form_set_error doesnot display error message the first time

Hi,
I have created a login block to be displayed on my home page.. using a custom module..

I have performed authentication validations inspired from user_auth module.
The problem i am facing is,

using form_set_error() display error messages. but submitting the form for the first time reloads the page but doesnt display the error messages
In short the validation is performed but error messages does not show up, on clicking the button again I do get the messages displayed properly i.e refreshing the page displays error messages.

Pages

Subscribe with RSS Subscribe to RSS - Drupal 7.x