Sorry I missed your query on sql and the icons in layout report, though it best to start a fresh one anyway. it looks like a database problem. When I go to current icons tab I get

* user warning: Table 'tuneu_db.drupal_mysite_icon' doesn't exist query: SELECT COUNT(*) FROM drupal_mysite_icon in /home/tu/tun/tuneup.com.au/public/www/drupal/includes/database.mysql.inc on line 172.
* user warning: Table 'tuneu_db.drupal_mysite_icon' doesn't exist query: SELECT iid, type, type_id, icon FROM drupal_mysite_icon ORDER BY icon ASC LIMIT 0, 50 in /home/tu/tun/tuneup.com.au/public/www/drupal/includes/database.mysql.inc on line 172.

and at add icons I get dozens of these

user warning: Table 'tuneu_db.drupal_mysite_icon' doesn't exist query: SELECT iid, type, type_id, icon FROM drupal_mysite_icon WHERE type = 'blog' AND type_id = 1 in

with the only difference being the id.

It allows me to add icons and I can view them via my ftp but if I go back to current icons it says ' no icons found'

CommentFileSizeAuthor
#4 mysite_icon.patch481 bytessos4nt
#3 mysite_icon.install.txt2.04 KBagentrickard

Comments

agentrickard’s picture

OK, this is a bug in the mysite_icon.install file, then, since the {mysite_icon} table didn't get created.

Did you get any errors when trying to install the module?

Try uninstalling MySite Icon and then reinstalling the module. Our you could just use this code in PhpMyAdmin or command line MySQL:

CREATE TABLE mysite_icon (
        iid int(11) NOT NULL default '0',
        type varchar(40) NOT NULL default '',
        type_id int(10) NOT NULL default '0',
        icon varchar(80) NOT NULL default '',
        PRIMARY KEY  (iid),
        UNIQUE KEY icon (icon),
        KEY type (type),
        KEY type_id (type_id)
      ) /*!40100 DEFAULT CHARACTER SET UTF8 */

And report any errors. It _might_ be the default '' if you're running in strict mode (I've seen similar issues). If so, we'll have to change the schema.

agentrickard’s picture

Status: Active » Postponed (maintainer needs more info)

Waiting for user feedback before continuing.

See http://dev.mysql.com/doc/refman/5.0/en/data-type-defaults.html for reference.

agentrickard’s picture

StatusFileSize
new2.04 KB

I need this tested on MySQL 5, strict, which I do not run.

Please download the attachment, rename it to mysite_icon.install, place it in your mysite module directory (replacing the existing file) and then try to uninstall and reinstall the MySite Icons module.

Please report any errors here.

sos4nt’s picture

Status: Postponed (maintainer needs more info) » Needs review
StatusFileSize
new481 bytes

This is not specific to MySQL 5. The curly braces around the table name are missing in the first SQL query.

the fatman’s picture

Sorry about the long delay - a long story

I replaced the code in mysite_icon.install with that from the first attachment mysite_icon.install.txt
Unintalled mysite icons
Re-enabled it

I got this warning

user warning: Table 'mysite_icon' already exists query: CREATE TABLE mysite_icon ( iid int(11) NOT NULL default '0', type varchar(40) NOT NULL, type_id int(10) NOT NULL default '0', icon varchar(80) NOT NULL, PRIMARY KEY (iid), UNIQUE KEY icon (icon), KEY type (type), KEY type_id (type_id) ) /*!40100 DEFAULT CHARACTER SET UTF8 */ in /home/tu/tun/tuneup.com.au/public/www/drupal/includes/database.mysql.inc on line 172.

It still enabled it but I'm getting the same error as before

I'm sorry but I don't know how to apply the patch you just added, could you post some step by step instructions for a newbie

Thanks

sos4nt’s picture

I'm sorry but I don't know how to apply the patch you just added, could you post some step by step instructions for a newbie

Here you go: edit mysite_icons.install and on line 14 replace CREATE TABLE mysite_icon with CREATE TABLE {mysite_icon} (note the curly braces). Then reinstall the module.

the fatman’s picture

All good
I've been able to add an icon and everything looks fine. Thanks for your help and quick response.

agentrickard’s picture

Status: Needs review » Reviewed & tested by the community

Thanks sos4nt. I'm back from vacation and will commit this tonight.

agentrickard’s picture

Title: mysite icons and mysql5 » MySite Icons using table prefixing

Changing title to help people find the patch.

agentrickard’s picture

Status: Reviewed & tested by the community » Fixed

There was also a horrible error in the pgsql install statement. Ug. Rolling a new release as a result.

agentrickard’s picture

Component: Miscellaneous » MySite Icons
Status: Fixed » Closed (fixed)

5.x.2.2 corrects this issue. Thanks all!