Installation and activation went fine, but when I go to the Administer -> individual modules page, and when I click the "Node style" link, I get this warning:

user warning: Table 'xxxxxxxxxxx.node_style_maps' doesn't exist

Ludo

Comments

Zen’s picture

Status: Active » Postponed (maintainer needs more info)

Can you please:

a) check your database and check the table list for any node_style tables? Please also try uninstalling (via the modules page's uninstall tab) the module and reinstalling it.
b) give me the exact URL where you get this message. admin/build/node_style?

Thanks,
-K

Zen’s picture

Furthermore, information on our setup will also be useful - PHP, MySQL versions etc.

-K

modul’s picture

Hi Zen,

I get the error (or rather "warning") on these url's:

- ?q=admin/build/node_style

- I also get this error on my home page:
# user warning: Table 'xxxxxxx.node_style_maps' doesn't exist query: SELECT m.sid, s.variables FROM dru_node_style_maps m LEFT JOIN dru_node_style_schemes s USING (sid) WHERE m.nid = 19 in /xxxxxxxxx/includes/database.mysql.inc on line 172.

# user warning: Table 'xxxxxxxxxx.node_style_maps' doesn't exist query: SELECT m.sid, s.variables FROM dru_node_style_maps m LEFT JOIN dru_node_style_schemes s USING (sid) WHERE m.nid = 16 in /xxxxxxxx/includes/database.mysql.inc on line 172.

# user warning: Table 'xxxxxxxx.node_style_maps' doesn't exist query: SELECT m.sid, s.variables FROM dru_node_style_maps m LEFT JOIN dru_node_style_schemes s USING (sid) WHERE m.nid = 17 in /xxxxxxxxx/includes/database.mysql.inc on line 172.

3) My table prefix is dru_

4) I use Drupal 5.1

5) Some system info:
PHP built On: Linux tobias 2.6.17.13-grsec2.1.9-vs2.0.2.1 #4 SMP Tue Sep 26 17:14:01 CEST 2006 i686
Database Version: 4.0.12
PHP Version: 4.4.6
Web Server: Apache/1.3.37 (Unix) PHP/4.4.6 AuthMySQL/2.20 mod_ssl/2.8.28 OpenSSL/0.9.7e
WebServer to PHP interface: apache

Relevant PHP Settings:
Safe Mode: ON
Open basedir: none
Display Errors: ON
Short Open Tags: ON
File Uploads: ON
Magic Quotes: ON
Register Globals: ON
Output Buffering: OFF
Session save path: /var/tmp
Session auto start: 0
XML enabled: Yes
Zlib enabled: Yes
Disabled Functions: none

I am working on a shared server, and I have no direct access to PHP settings or to MySQL settings. I have to use "as is".

I used phpmyadmin to check my database, and there IS a table dru_node_style_schemes (which is empty), but that is all, no other node_style tables.

Hope this information gets you on the right track? Later on, I'll try uninstalling and re-installing, and I'll keep you informed. Thanks for the good work!

Ludo

modul’s picture

Solved it! The problem I pointed out has to do with the fact that the table prefix is not used for the node_style_maps table is not used when the module is installed. Hence, I had one table called "node_style_maps", and one table "dru_node_style_schemes" ("dru_" being my table prefix), which, obviously, led to problems. Manually renaming "node_style_maps" into "dru_node_style_maps) made it work. Maybe you should cover this in a next release? Anyway, I'm going to find out what your module can do now :-)

Ludo

modul’s picture

I forgot to mention that the Uninstall "forgets" about the unprefixed table, i.e. it is left in place. The prefixed table is deleted by the Uninstall procedure.

Ludo

Zen’s picture

Status: Postponed (maintainer needs more info) » Closed (duplicate)

Ah, cheers. This was actually fixed a few weeks back, but a new release hasn't been made since then (should be out soon). If you like, you can use a checkout of the DRUPAL-5 branch (or use the development snapshot from the project page), or alternatively, wrap the database name in node_style.install in curly brackets - {} to allow the handling of prefixed tables.

Thanks for your report :)
-K