Problem with array_fill()

philostik - July 8, 2008 - 13:42
Project:Glossary
Version:5.x-1.0
Component:Code
Category:bug report
Priority:normal
Assigned:Unassigned
Status:active
Description

Hi All,

When I enablethe 'random glossary' block within the drupal website, I get the following error on the webpages =>
-----------------------------------
warning: array_fill() [function.array-fill]: Number of elements must be positive in /etc/drupal/5/sites/all/modules/glossary/glossary.module on line 79.
warning: implode() [function.implode]: Bad arguments. in /etc/drupal/5/sites/all/modules/glossary/glossary.module on line 79.
user warning: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ') ORDER BY RAND() LIMIT 0, 1' at line 1 query: SELECT tid FROM term_data WHERE vid in () ORDER BY RAND() LIMIT 0, 1 in /var/www/html/includes/database.mysql.inc on line 172.
-----------------------------------
The line 79 of /etc/drupal/5/sites/all/modules/glossary/glossary.module reads:
$placeholders = implode(‘,’, array_fill(0, count($vids), ‘%d’));

Any inputs will be highly helpful!

Thanks...

-Manish

#1

NancyDru - July 28, 2008 - 13:52

It sounds like you don't have any vocabularies checked in any of the Input Formats, so the module doesn't know where to find the terms to show.

#2

philostik - August 1, 2008 - 00:43

Hey,

Thank you very much for getting back. Can you kindly tell me how do I go about checking in the vocabulary input format. I am new to this module and the associated terminology! Looking forward to your help...

#3

NancyDru - August 1, 2008 - 15:11

The settings page has a tab for each input format. Within those tabs, there is a setting for which vocabulary(ies) to use.

#4

philostik - August 4, 2008 - 02:34

Hey,

Thanks...I got rid of that issue (don't know how though..just played around with few settings). However, there are still no items being shown whenever I enable 'Glossary Random' block. When I enabled 'Glossary Search' block and searched for a word 'phenology' I got the following error:

* user warning: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ') AND (td.description LIKE '%%' OR td.name LIKE '%%')' at line 1 query: SELECT td.tid FROM term_data td WHERE td.vid IN () AND (td.description LIKE '%%' OR td.name LIKE '%%') in /var/www/html/includes/database.mysql.inc on line 172.
* user warning: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ') AND (td.description LIKE '%phenology%' OR td.name LIKE '%phenology%')' at line 1 query: SELECT td.tid FROM term_data td WHERE td.vid IN () AND (td.description LIKE '%phenology%' OR td.name LIKE '%phenology%') in /var/www/html/includes/database.mysql.inc on line 172.

I am sorry. I know I have been bugging you a lot. But I think I can reach to a concrete solution by exchanging words with you. I hope you will take it all positively. Thanks for your timely replies. Kindly let me know in case you have any idea about how to move forward from here...

Manish

#5

philostik - August 5, 2008 - 13:45

Hello There,

I read the following article:
http://drupal.org/node/69583

Under the 'Configuring the Glossary':
# Under the "View" tab (which is the default), under "Filters," enable the "Glossary filter", At the bottom of the page, click "Save Configuration". After it is saved, you will be on the same page.
# Now, at the top of the page, click on the "configure" tab.
# Click on "Glossary Filter" which will open up some choices. In the "Select Vocabulary" box, click on the vocabulary term(s) that you created in Administer>Categories.

Though I enabled the 'Glossary Filter', when I click the configure tab, I only see an option for 'URL Filter' and nothing else. Could this be the potential problem with installation itself. Kindly advise.

-Manish

 
 

Drupal is a registered trademark of Dries Buytaert.