Form error with Rubik administration theme

Asked By 10 points N/A Posted on -

Hi all,

I'm running Rubik for my administration theme. If a form is submitted without filling in a required field, say at /node/add/story, Drupal will provide an error message saying that the "Title field is required" and it will reload the form again with the required fields outlined in red.

The problem is that the error message and the form, along with the outlined fields, are not displayed in Rubik. They pop up in the default front-end theme. The form is viewed, like totally wiped-out, in the front-end theme. I need to solve this but I haven’t found any solution for this. Any help would be appreciated. Thanks for the suggestions.

Answered By 0 points N/A #94228

Form error with Rubik administration theme


Dear Jdaniels

According to the error message you got using "Rubik", try to have a look at this page under the subject "How to force a different theme for a specific Admin pages when the Administration theme is set" . For simplification, you need to create a new module named "admintheme" and add this code snippet in it:  

function admintheme_init() {
    global $custom_theme;
    if (arg(0) == 'node' && ((arg(1) == 'add') || (arg(2) == 'edit' ))) {
        $custom_theme = variable_get('admin_theme', 0);

You may set the module weight in the system table to zero. This will solve the problem for you.

Hope this may help you.

Best of luck

Login/Register to Answer

Related Questions