UPDATE: This issue is a duplicate. Please see #1631846: Server 500 Error while enabling the module status updates.

Welcome!
If this option after I allow you to block I get this error:

Fatal error: Call to undefined function i18n_langcode() in /var/www/p73/data/www/dc.p73.hu/sites/all/modules/taxonomy_block/taxonomy_block.module on line 94

thank you
Stephen

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

ANDiTKO’s picture

Same here. Before i update to the latest version it was working perfectly. Now i get this error and the page cannot be rendered.

I think it has to do something with the i18 module (that i have NOT installed on the site that is giving me the error.) i18n_langcode() function wont work for sites that havent enabled the i18n module.

Please use this function to fix this error
http://api.drupal.org/api/drupal/includes!module.inc/function/module_exi...

ANDiTKO’s picture

Status: Active » Needs review

Well, i was going to create a patch for this.
But when i got the git version it was working fine.

Use this git code and confirm if you continue to have this problem:
git clone --recursive --branch 7.x-1.x http://git.drupal.org/project/taxonomy_block.git

wizian’s picture

After having problems with install, newest branch from git (dated 2012-06-08) works, however install via drush (even after disable and enable) does not update admin menu. Have to do it from the GUI.

GrahamShepherd’s picture

This is a fatal error. It disables my site entirely.
Recovery for me was to disable the block in MySQL from phpMyAdmin. I then disabled the module.
The concept of the block is good but not usable at the moment.

matthew999123’s picture

How exactly do you use "git code"?

ANDiTKO’s picture

FileSize
3.58 KB

Just paste the code that i quoted before in yout git client:

git clone --recursive --branch 7.x-1.x http://git.drupal.org/project/taxonomy_block.git

Or download the module code that works. Im going to attach the file

mjross’s picture

Title: Call to undefined function i18n_langcode » Call to undefined function i18n_langcode (with a patch)
FileSize
1011 bytes

This patch fixes both erroneous calls to i18n_langcode() in taxonomy_block.module. But it should only be applied to websites that are using English taxonomy terms exclusively. This is intended as a workaround to help those people whose websites have been broken by this bug. It is not intended as a long-term fix, especially for any sites that might use non-English languages in the future.

k.dani’s picture

Hi Everyone,

I don't really know, why is this variable neccessary in the taxonomy_block_block_view(), because nothing uses it inside the function, so my suggestion is to remove this line from the code and everything works as it should.

Best,
Daniel

k.dani’s picture

I create a patch from it, I think it is the simpliest way to solved this issue.

DanielWashbrook’s picture

Just removing that instance of the function isn't going to fix it. It should really check if the functions exist.

A 'better' solution at this point is to just install the i18n module that it's calling. Especially since the taxonomy tree building function is using similar translation functions anyway.

For the record, these seemed to fix it:
i18n, variable, locale ,i18n_taxonomy, i18n_translation, i18n_string

cwithout’s picture

Status: Needs review » Closed (duplicate)

Marking this as duplicate of #1631846: Server 500 Error while enabling the module. There's no need to patch this issue, since the current repo doesn't have the issue.

The solution until the maintainer fixes the current release is to either revert to 1.2 or follow the instructions in #6 of this issue to download the current code via git or the zip file ANDiTKO uploaded.

rubofvil’s picture

I load the last version and don't work.

My solution is do it the same query that the module but with entity field query and with the condition of language.

The field of the taxonomy and content type is necessary configurate manually.

function taxonomy_block_count_nodes_term($tid) {
  
  global $language;

  $query = new EntityFieldQuery();
  $entities = $query->entityCondition('entity_type', 'node')
                    ->entityCondition('bundle', 'blog')//Necessary change
                    ->fieldCondition('field_taxonomy_blog', 'tid', $tid)//Necessary change
                    ->propertyCondition('language', $language->language, '=')
                    ->execute();

  dsm($entities);




  return count($entities['node']);
    
}
cwithout’s picture

I've just added a dev release for this module . It should be available on the project page once the system process it. I would like to move that to a new Taxonomy Block 7.x-1.4 release after testing

When the dev becomes available, please test. Post results to #1631846: Server 500 Error while enabling the module.

cwithout’s picture

Issue summary: View changes

Add message to refer to the open issue