Module generates user warning in Module page
shelleyp - July 31, 2008 - 16:26
| Project: | Vocabulary Index |
| Version: | 6.x-2.x-dev |
| Component: | Code |
| Category: | bug report |
| Priority: | critical |
| Assigned: | Xano |
| Status: | closed |
Jump to:
Description
I'm getting the following user warning in the Module page:
user warning: Unknown column 'type' in 'where clause' query: SELECT vi.*, voc.vid, voc.name, voc.description FROM vocabindex vi LEFT JOIN vocabulary voc ON vi.vid = voc.vid WHERE type = 2 AND enabled = 1 ORDER BY voc.name, voc.weight ASC in /home/shelleyp/public_html/realtech/modules/vocabindex/vocabindex.module on line 408.
I did run an update.php after installing the module, but the application said no db updates were made.

#1
And unfortunately trying this module deleted all of my custom category menu items, which were assigned to vocabindex main page. The menu will take a couple of hours to rebuild.
#2
#3
Sorry that should be normal.
My issue is I was managing the menus incorrectly, going against built-in behavior. What I was doing was assigning a custom menu item directly to the vocabindex generated url page, rather than change the parent in Navigate. The vocab index menu item does get deleted every time a new item is added. In addition, removing the module, removed all of the vocab index pages, which basically orphaned all of the sub term menu items, leading to a very long sidebar menu.
#4
All 6.x-2.x-dev snapshot releases from July 22 and after should not modify the menu anymore. I just found one last piece of code that would edit the menu item pointing at a vocabindex page if the vocab of that page was edited. Are you sure you have used a recent snapshot? Next to that: Never, ever use development releases on live sites unless you're willing to take the risk.
About the SQL error: It seems to me you have just disabled the old module and enabled 6.x-2.x-dev. The instructions at the project main page state you will have to completely uninstall the previous version. You will lose your old vocabindex pages (just the pages, not the vocabularies and terms themselves), but you should be able to re-create them very easily. Once 6.x-2.0 comes out I will create an update function to automatically conver the old table to the new one so no data will get lost.
#5
I'm aware of the risks associated with a development version. I didn't have a test site, previously, because maintaining a Drupal test site identical to one of my release sites is time prohibitive. Drupal doesn't "copy".
Normally I'd hesitate about using a development module, except that you had made the change for my bug, and I felt it was rude not to test it. So I did, and reported results. The side effect is that I now have an opportunity to make any taxonomy changes I've been hesitant to make in the past, because doing so deleted all of the vocabindex pages and associated menu items.
#6
Copying Drupal is relatively easy: copy the files using your FTP programme and create a DB dump using phpMyAdmin.
Thank you very much for testing this module! Have you tried re-installing it already?
#7
Curious, how do you get the copied version to go against the duplicated database, rather than the original production database? Do you hand edit the settings file, after first making it writable? The application also is confused about where everything is, and when I've looked online about how to duplicate an existing site, most of the advice I've seen has been about moving a site to a new server, but everything else left the same.
That's outside of the scope of this issue, though, so never mind.
Yes, I completely uninstalled everything (disable, uninstall, delete old files), and then copied over and enabled your newest development version. I got the following errors:
# warning: include(./modules/vocabindex/theme/vocabindex_page.tpl.php) [function.include]: failed to open stream: No such file or directory in /home/shelleyp/public_html/realtech/includes/theme.inc on line 971.
# warning: include() [function.include]: Failed opening './modules/vocabindex/theme/vocabindex_page.tpl.php' for inclusion (include_path='.:/usr/lib/php:/usr/local/lib/php') in /home/shelleyp/public_html/realtech/includes/theme.inc on line 971.
I looked in your theme directory and these files are named "pager" not "page".
#8
You will have to edit the settings file to match the database name, username and password. I forgot to tell you that.
Both a vocabindex_page.tpl.php and a vocabindex_pager.tpl.php should be present in the 'theme' directory.
#9
Okay, I just noticed that the file wasn't present in the CVS repo. I guess I forgot to add it to CVS after moving the template files to their subfolder. You may either wait for the packaging script to run and create a new download including this file or download it directly.
#10
I duplicated that file and it seems to be working now.
Thanks. Sorry for all the notes.
#11
I don't mind all the notes :-) I appreciate them. A bit too much information is always better than too little. Besides, I wouldn't have found about this bug if you hadn't reported it.
Are the SQL errors gone too now?
#12
Yeah, and I can add and delete taxonomy items, and the associated vocabulary index pages aren't being removed. Much better, thanks for making that bug fix.
#13
No problem, thanks to you for reporting the bug!
#14
Automatically closed -- issue fixed for two weeks with no activity.