Moved Forums

ThemeSnap.com Forums have Moved! Please note that our forums have moved here: New ThemeSnap.com Forums. You will still be able to read forum threads in the forum categories or threads below. However, you will not be able to post new forum topics or replies to existing threads. Please post any new forum posts in our new forum section by registering a new account.

Publisher theme breaks Locale core module

10 replies [Last post]
shhansen73
shhansen73's picture
Offline
Joined: 11/03/2009
Points: 0

I am trying to install the Publisher theme on a site with the Locale module installed.

There are two bugs:

1) The Locale block's Language Switcher block does not work. I've verified this works with other themes. The $path for the non-default language strips out the path prefix, so English and the other language have an identical path.

2) When the I18n internationalization module is installed, the black_bg.png path is incorrect, and switches to the modules/i18n/images/ path instead, so the link is broken.

Bug #1 is for the core Locale module, and we can work around #2 by placing black_bg.png in the i18n directory.

Test site is at: www.ueharahalloween.org.

--Shawn

--------------------------------------------------------------------------------------------------------

local.module below:

--------------<>-------------
Local block:

// ---------------------------------------------------------------------------------
// Language switcher block

/**
* Implementation of hook_block().
* Displays a language switcher. Translation links may be provided by other modules.
*/
function locale_block($op = 'list', $delta = 0) {
if ($op == 'list') {
$block[0]['info'] = t('Language switcher');
// Not worth caching.
$block[0]['cache'] = BLOCK_NO_CACHE;
return $block;
}

// Only show if we have at least two languages and language dependent
// web addresses, so we can actually link to other language versions.
elseif ($op == 'view' && variable_get('language_count', 1) > 1 && variable_get('language_negotiation', LANGUAGE_NEGOTIATION_NONE) != LANGUAGE_NEGOTIATION_NONE) {
$path = drupal_is_front_page() ? '' : $_GET['q'];
enuages = language_list('enabled');
$links = array();
foreach (enuages[1] as enuage) {
$links[enuage->language] = array(
'href' => $path,
'title' => enuage->native,
'language' => enuage,
'attributes' => array('class' => 'language-link'),
);
}

// Allow modules to provide translations for specific links.
// A translation link may need to point to a different path or use
// a translated link text before going through l(), which will just
// handle the path aliases.
drupal_alter('translation_link', $links, $path);

$block['subject'] = t('Languages');
$block['content'] = theme('links', $links, array());
return $block;
}
}

Jason
Jason's picture
Offline
Joined: 01/03/2008
Points: 8
Thanks, could I request a bit more info.

Hi,
Thanks for the detailed output. Could you please email via the support form under contact in the top nav bar and include your email used when ordering the theme? We are trying to cut down on abuse but I could not find your order using your name or email address used here at the forums.

Also, your URL link in your post above did not work for me.

Thanks
Jason

shhansen73
shhansen73's picture
Offline
Joined: 11/03/2009
Points: 0
Information sent via Contact

Thanks for your reply.

I emailed the information via the Contact form, as well as admin information for the site.

Regards,

--Shawn

Jason
Jason's picture
Offline
Joined: 01/03/2008
Points: 8
Programmer is looking at this issue today

Will update you once he's examined any possible bug in the theme.

Jason
Jason's picture
Offline
Joined: 01/03/2008
Points: 8
Update on Locale module

Hi Shawn,
Here is the reply after my programmer tested this module. I'm also waiting on a reply back on switching from one theme to another and it working and not working, but please take note of the initial response below. Thx.

"The customer uses these modules:
http://drupal.org/project/migrate_i18n
http://drupal.org/project/i18nredirect
http://drupal.org/project/i18nlogo

These modules generate and add new directories to paths on web sites for multilang redirecting for certain languages. He has likely made the wrong configuration of the settings of these modules to get the language internationalization and it has resulted in error paths on the web site with image nodes, etc.

We tested Publisher with Locale switcher module (http://drupal.org/node/6787). It's working properly for us."

Shawn Hansen (not verified)
Shawn Hansen's picture
turned off i18n modules--still not working

FYI: I have completely disabled the i8n modules, and the locale switcher module is still not working. This is a vanilla site, with few modifications.

You have complete admin access to the site. It is a test site, so please feel free to change anything to verify this issue.

I have tried Publisher on a separate independent site that has Locale installed. Same issue with disabling the switcher block.

Note the Locale module works fine with other themes.

Jason
Jason's picture
Offline
Joined: 01/03/2008
Points: 8
Update #2 on Locale module/block switcher

Our former programmer for the Publisher v1.5 changed a portion of the the file from the theme's template.php to more of a custom developed code to work with the theme's output. This impacted the function theme_links functionality.

This custom function does not support some standard Drupal theme functionality and the problem like the one with the Locale Switcher module. We are now going through the template file for the Publisher theme and theme template engine system created for that version. We will fix this problem but we need to explore all changes he made in theme template engine to get back the full theme functionality.

Even though some programmers follow Drupal's standards for theming to the tee, occasionally something might get omitted or an oversight might happen, as it did here.

I have put this into the queue to fix. Should be sometime next week when we have it completed and will send out an update to purchasers to update a few core theme files.

Shawn Hansen (not verified)
Shawn Hansen's picture
Thank you!

Thank you very much. The Locale Switcher module is an essential part of an international site.

Thanks for the support. I'll await your fix for next week.

Regards,

--Shawn

Shawn Hansen (not verified)
Shawn Hansen's picture
Update to Local Module Fix

Hello,

Has there been an update on the fix to the theme yet?

--Shawn

Jason
Jason's picture
Offline
Joined: 01/03/2008
Points: 8
Hi Shawn, yes, it's fixed

Will send you the update for the theme in just an hour or so...

Shawn Hansen (not verified)
Shawn Hansen's picture
Thank you

Thank you very much.

--Shawn

Post new comment

The content of this field is kept private and will not be shown publicly. If you have a Gravatar account associated with the e-mail address you provide, it will be used to display your avatar.
  • Web page addresses and e-mail addresses turn into links automatically.
  • Allowed HTML tags: <a> <strong> <code>
  • Lines and paragraphs break automatically.
  • Each email address will be obfuscated in a human readable fashion or (if JavaScript is enabled) replaced with a spamproof clickable link.

More information about formatting options

Type the characters you see in this picture. (verify using audio)
Type the characters you see in the picture above; if you can't read them, submit the form and a new image will be generated. Not case sensitive.