• Resolved troglobyte

    (@troglobyte)


    I´ve just installed version 2.4.1 of plugin and files are copied, the tables are created and cache folder is write enabled and has files. Dashboard menu entry is visible and plugins are active but no data is recorded

    The function wp_footer() is invoked at the end of footer.php, and other plugins are adding code but there is any reference to your plugin

    *** Page HTML ***

    <script type='text/javascript' src='http://www.musicasnblog.com/wp-includes/js/admin-bar.js?ver=20110131'></script>
    <div id="wpadminbar">...</div>
    </body>

    Any idea? Thanks

Viewing 15 replies - 1 through 15 (of 15 total)
  • Hi there,

    no data at all? In this case there could be a problem with the database. Do you see all the 6 tables related to my plugin? (wp_slim_*) Also, are you using a cache plugin, like W3 Total Cache or similar?

    Camu

    Thread Starter troglobyte

    (@troglobyte)

    Thanks for the fast reply.

    We´re not using any cache-plugin.
    There is only 3 tables created and the 3 are empty:
    -msn43_slim_browsers
    -msn43_slim_visits
    -msn43_slim_outbound
    And maybe this is important, we are using the IIS version of WordPress with an SQL Server 2008

    But I don´t understand why there is no js code created in the wp_footer() call

    Thanks again

    Hi there,

    the plugin is not working because there are 3 missing tables. You may want to try to deactivate/reactivate WP SlimStat and see if the missing tables are created. If not, is this a multisite environment?

    Camu

    Thread Starter troglobyte

    (@troglobyte)

    I tried deactivate/reactivate and today installed new version (2.4.1) over (2.4.0) but no new tables were created, so 3 tables arew missing yet.

    And yes, it´s a multisite enviroment, currently with only one site but multisite anyway.

    Wp Slimstat, as stated in the description, may not work properly in a multisite environment. In your case, for some reason it seems like the variable $table_prefix (blog specific prefix) hasn’t been initialized. You may want to try using Proper Network Activation, a plugin that solves a WordPress issue that may be the cause of your problem.

    Alternatively, you may try to manually create those tables using the right prefix. Or inspect your logfiles for clues…

    Camu

    Thread Starter troglobyte

    (@troglobyte)

    Thanks Camu,

    there is a few SQL Server syntax related errors in the log, I´ll try to create the tables manually.

    Do you want the errors and updated SQL querys if we get it running?

    Yes, please. By the way, I didn’t know you could run WordPress on SQL Server, I learned something new today 🙂 Thank you for your feedback.

    Camu

    Thread Starter troglobyte

    (@troglobyte)

    Looks like all the problems creating the tables are SQL Server syntax related. Here is the official SQL SErver distro:
    http://wordpress.visitmix.com/download

    We created the 3 missing tables with minimun changes (just one line each) in the SQL but we´re not sure it´ll work

    [line 5] There is a problem with the KEY syntax, maybe this syntax will work with any database

    CREATE TABLE msn43_slim_countries (
    				ip_from INT DEFAULT 0,
    				ip_to INT DEFAULT 0,
    				country_code CHAR(2) DEFAULT '',
    				CONSTRAINT ip_from_idx KEY (ip_from, ip_to)			);

    [line 5] In Sql Server there is no boolean, the bit field is the most similar

    CREATE TABLE msn43_slim_screenres (
    				screenres_id SMALLINT NOT NULL IDENTITY(1,1),
    				resolution NVARCHAR(12) COLLATE Latin1_General_BIN DEFAULT '',
    				colordepth NVARCHAR(5) COLLATE Latin1_General_BIN DEFAULT '',
    				antialias bit DEFAULT 0,
    				CONSTRAINT [msn43_slim_screenres_screenres_id] PRIMARY KEY CLUSTERED (screenres_id) WITH (IGNORE_DUP_KEY = OFF) ON [PRIMARY]
    ) ON [PRIMARY];

    [line 4] “user” is a SQL Server internal use registered word, you can use it with quotes but will be great to change it

    CREATE TABLE msn43_slim_stats (
    				id INT NOT NULL IDENTITY(1,1),
    				ip INT DEFAULT 0,
    				"user" NVARCHAR(255) COLLATE Latin1_General_BIN DEFAULT '',
    				language NVARCHAR(5) COLLATE Latin1_General_BIN DEFAULT '',
    				country NVARCHAR(2) COLLATE Latin1_General_BIN DEFAULT '',
    				domain NVARCHAR(255) COLLATE Latin1_General_BIN DEFAULT '',
    				referer NVARCHAR(2048) COLLATE Latin1_General_BIN DEFAULT '',
    				searchterms NVARCHAR(2048) COLLATE Latin1_General_BIN DEFAULT '',
    				resource NVARCHAR(2048) COLLATE Latin1_General_BIN DEFAULT '',
    				browser_id SMALLINT NOT NULL DEFAULT 0,
    				screenres_id SMALLINT NOT NULL DEFAULT 0,
    				plugins NVARCHAR(255) COLLATE Latin1_General_BIN DEFAULT '',
    				visit_id INT NOT NULL DEFAULT 0,
    				dt int DEFAULT 0,
    				CONSTRAINT [msn43_slim_stats_id] PRIMARY KEY CLUSTERED (id) WITH (IGNORE_DUP_KEY = OFF) ON [PRIMARY]
    ) ON [PRIMARY];

    We keep testing…

    Hi there,

    looks like BIT is only available in MySQL starting from version 5.0.3 (and 5.0.5 for InnoDB)

    http://dev.mysql.com/doc/refman/5.0/en/numeric-types.html

    As for “user”, you may understand that changing that field name would impact the code, backward compatibility and such, so I would prefer to keep it this way. People using SQL Server could use your very detailed information here above to adapt the plugin and make it work.

    Thank you for your time, a vote for my plugin would be greatly appreciated!

    Camu

    Thread Starter troglobyte

    (@troglobyte)

    Maybe INT could be used for compatibility instead of BIT. And “user” could be used with quotes.

    Unfortunately there is a few more SQL Server syntax problems:
    – Incorrect syntax near ‘LIMIT’.
    – ‘TIMEDIFF’ is not a recognized built-in function name.
    – Incorrect syntax near ‘count’
    Maybe some more in the administration panel.

    Vote is done, of course. And if I get it running and working, donation too.

    Thank you for your vote.

    As for the compatibility issues, I guess I could rewrite the SELECT queries to avoid reserved words and such. Or you could work on a new “version” of my plugin that is designed to run with SQL Server, and I could link to it from my plugin’s page 🙂 The DB structure is pretty stable, so after the initial release, you wouldn’t have much to “maintain” when a new version is released 🙂 What do you think?

    Camu

    Thread Starter troglobyte

    (@troglobyte)

    I´ll love to work in a SQL Server version but I barely have available time to make a stable version and give the support it deserves to keep the current quality standard.

    Anyway I´ll try to make a SQL version and I´ll keep you informed about the progress and work required.

    Thanks again for you support and the great plugin, of course 🙂

    Believe me, I totally understand 🙂 Donating your spare time to the community isn’t easy at all. Because as you said, it’s not just developing the plugin, but also maintaining and supporting it.

    But please, if you can, keep us posted on your “modified” version, I guess it would be really helpful to other users.

    Best,
    Camu

    Camu,

    Any update on having this work with SQL? I too am running wordpress on IIS with SQL Server and would love to use your plugin. Let me know if there is anything I can do to assist.

    Mphacker,

    you can just change the source code of wp-slimstat.php and implement the few edits needed to make the database structure compatible with SQL Server. After you do that, activate my plugin and you should be good to go.

    Camu

Viewing 15 replies - 1 through 15 (of 15 total)

The topic ‘wp_footer() doesn´t include any wp-slimstat js code’ is closed to new replies.