Support ⇒ Modules & Blocks ⇒ Jokes 2 Module ⇒ Community Forums ⇒ CPG Dragonfly™ CMS
Forum IndexModules & Blocks

Jokes 2 Module Reply to topic

Go to page Previous 1, 2, 3, 4, 5, 6, 7 Next

PeLLaRaS
I am getting this when I uploaded the Mod.

includes/db/db.php
CMS Warning line 51: On /Main1/admin.php While executing query "SELECT COUNT(*) FROM cms_jokes_jokes WHERE active=2" the following error occured: Unknown column 'active' in 'where clause' In: /home/www/public_html/test/modules/Jokes/admin/adwait.inc on line: 14

Server specs (Server OS / Apache / MySQL / PHP / DragonflyCMS):
Unix/Apache 1.3.36/MySQL4.1.18-standard/PHP4.4.2/PERL 5.8.7/DflyCMS 9.1.2.1


PoKo wrote
The Joke module is a great module for a lot of things! In fact it is so great that it is a shame it is called "Jokes"
Why not name it something more neutral and let people use it for anything from poems, jokes, stories etc...

Never thought of that. There are of course others modules you can achieve this (e.x. the forum, blogs, content etc) but it's always better to have many choices! I'll try to make a "neutral" module, without any promises!

@fratz: Did you "updated" the module form the admin panel? (under modules, find jokes and click edit, you should see a link "update" or something, click it and see if its working)

Server specs (Server OS / Apache / MySQL / PHP / DragonflyCMS):
FreeBSD 4.8-RELEASE/ 1.3.31/4.0.18/4.3.8/9.0.3.0


I can not get in to my admin panel it (jokes) locked up the system. but when I deleted the Mod then I could get back in.

Server specs (Server OS / Apache / MySQL / PHP / DragonflyCMS):
Unix/Apache 1.3.36/MySQL4.1.18-standard/PHP4.4.2/PERL 5.8.7/DflyCMS 9.1.2.1


Temporary disable the old module, delete the old files, upload the new, update the module and finally activate the module!

Server specs (Server OS / Apache / MySQL / PHP / DragonflyCMS):
FreeBSD 4.8-RELEASE/ 1.3.31/4.0.18/4.3.8/9.0.3.0


hm, just tried installing this 3 times and i get almost the same error as frtaz, tried as per your instructions and its all fine untill i enable the module then it kills the site

includes\db\db.php

* CMS Warning line 51: On /admin.php?op=modules While executing

query "SELECT COUNT(*) FROM cms_jokes_jokes WHERE active=2"

the following error occured: Unknown column 'active' in 'where clause' In: *serverpath my edit* \modules\Jokes\admin\adwait.inc on line: 14

i also have the dragonfly2 menu installed, and a recipes module which i have been working on which is a rewrite of the original jokes module, but it co existed with the old jokes without any conflicts

will have another play with this tomorrow and post back here if i have any luck

Pretzy's Place Pertzel Family Tree History Genealogy
Riverlife Church Henty

Server specs (Server OS / Apache / MySQL / PHP / DragonflyCMS):
XP_Apache 2.2.2_MySQL 5.0.21_PHP 5.1.4_CPGNuke 9.1.1


This is a fatal code flaw - your adwait.inc file must have an is_active check
if (is_active('Whatever') && can_admin('whatever')) {
blah blah
}

DonationsPro for DragonflyCMS & SMF

Server specs (Server OS / Apache / MySQL / PHP / DragonflyCMS):


@Phoenix: It is writen that way!

if (is_active('Jokes') AND can_admin('jokes')) {
	require('modules/'.$module.'/cfg.inc');

	$inactive = $db->sql_count($prefix.'_jokes_jokes', 'active=2');
	if ($jokesconfig['pendingvilification']=='1' OR ($jokesconfig['pendingvilification']!='1' AND $inactive > 0)) {
		$content .= '<img src="images/arrow.gif" border="0" alt="" /> <a href="'.adminlink($module.'&amp;mode=pending').'">'._PENDINGJOKES.'</a>: '.$inactive.'<br />';
	}
}


@pretzy: The error says that column "active" does not exists, and this is because the column "active" is introduce in this module and not the previous one.

Are you sure you disable the module. FIRST update through admin/modules/Jokes (click edit and then update) and THEN enable the module again?

I'll release a version where it first checks the existing version and if it's an older one, it will tell to update!

Server specs (Server OS / Apache / MySQL / PHP / DragonflyCMS):
FreeBSD 4.8-RELEASE/ 1.3.31/4.0.18/4.3.8/9.0.3.0


Apologies - in that case, perhaps an install note making it clear to deactivate the module before upgrading with a significant chyange like that might reduce the queries.

Server specs (Server OS / Apache / MySQL / PHP / DragonflyCMS):

Last edited by Phoenix on Sun Jan 01, 2006 12:20 pm; edited 1 time in total


yes, dissabled then tried updating, then deleted all the old files and tried to install it from scratch, same error each time no matter what i tried, altho i did not uninstall the old module first, but i dont think this should be necessary

i will have a look at the database tables when i get a chance

Pretzy's Place Pertzel Family Tree History Genealogy
Riverlife Church Henty

Server specs (Server OS / Apache / MySQL / PHP / DragonflyCMS):
XP_Apache 2.2.2_MySQL 5.0.21_PHP 5.1.4_CPGNuke 9.1.1


I tried a fresh install of the module, without any error. I tried upgrading the module from the old one, checking if it correct pass the old jokes (and the pending ones), categories, sub-categories (which they became categories), votes and comment without any error. The only error I will get (and is normal) is that the column active does not exist and only if I leave the module active and upload the files, or when I am trying to access a module section and the module is inactive, and in both cases I didn’t upgraded the database.

And I came to the conclusion: I really don't know why this is happening, and I only can guess a misunderstanding (cause from my site) which I didn't clarify that to update the module you should go to dragonfly admin panel, in the category "General" (and not "Modules") go the icon Modules, find Jokes and deactivate it. Then upload to the server the files of the new module, go back where you deactivated the module and in the right site find and click "edit". Go to the section "information", find and click Upgrade to 2.0.0, and then activate the module.

You should of course first go to Blocks and disable any block you might putted from the previous module.

Do not uninstall the old module because you will lose any joke you already posted

If this does not work, please post here (or pm me) the structure of your database (only the structure of the tables that are related with the module Jokes).

I'll surly soon release a new version that will do nothing until you upgrade the module, and of course clarify the steps needed to upgrade the module from the previous one.

Sorry if I end up been very confusing, but I really want to see this module working on other sites too!

Server specs (Server OS / Apache / MySQL / PHP / DragonflyCMS):
FreeBSD 4.8-RELEASE/ 1.3.31/4.0.18/4.3.8/9.0.3.0


no i think this may have been my mistake when i installed this module, perhaps i did not initially dissable the old version, and when i recieved the error i deleted the module files then tried a fresh install over the old database, i just tried installing it again and recieved the error as soon as i copied the files to my server root, before i could even enable the module, so its messing with the datbase somehow

i only have a couple of jokes installed so i think i will delete the datbase tables and start afresh, or perhaps copy the old version files back and try upgrading again

i upgraded this on my test site without a hitch, and it looks great. It only kills my live site lol

Pretzy's Place Pertzel Family Tree History Genealogy
Riverlife Church Henty

Server specs (Server OS / Apache / MySQL / PHP / DragonflyCMS):
XP_Apache 2.2.2_MySQL 5.0.21_PHP 5.1.4_CPGNuke 9.1.1


sucess at last!

i replaced the old version 1.22 Jokes files then installed and set everything up in the menu, dissabled it then copied the new version Jokes 2 files, edited the module then chose upgrade, sucessfully updated then activated the module as per your instructions. It kept my old jokes and no more errors, so its all good now

my apologies it seems i missinterpreted the instructions when i installed this module initially, sorry for the confusion it all worked as expected when i followed your instructions above to the letter

this will teach me to read and understand things properly rather than just expect them to work how i expect them to :S

The new version looks great and is a very professional addition to my site, thanks PeLLaRaS you have done a great job with this Smile

Pretzy's Place Pertzel Family Tree History Genealogy
Riverlife Church Henty

Server specs (Server OS / Apache / MySQL / PHP / DragonflyCMS):
XP_Apache 2.2.2_MySQL 5.0.21_PHP 5.1.4_CPGNuke 9.1.1


Glad to see the module running on other sites too! Very Happy

I just release version 2.0.1 with the follow changes:
- Made the module in such way that will automatically detected if a new version is uploaded and prompt to upgrade, without messing with errors. - change Rate definition to reflect to object rate for other languages - fixed rate algorithm which didn't take in to consideration the number of unregistered votes and registered votes - Added admin links for the java menu - Added Print Page for Jokes, where it uses the current theme!!

You can download it from here:
http://dragonflycms.org/Downloads_9x/details/id=318.html

Server specs (Server OS / Apache / MySQL / PHP / DragonflyCMS):
FreeBSD 4.8-RELEASE/ 1.3.31/4.0.18/4.3.8/9.0.3.0


I use the Jokes module, and the its random-Joke block.

When i logged in as admin or be in the Jokes module, the language-loading is correct, but when i'm in e.g. forums, the language-loading is incorrect.
It loads the english-file, not the hungarian. An error-handle code is in the block's code, what loads the english language-file for the Jokes.

So what's the difference in language-loading between logged-in-as-admin-too and logged-in-as-only-user for that modules what isnt used just then?

Server specs (Server OS / Apache / MySQL / PHP / DragonflyCMS):
Linux silver 2.6.17.9 #4 SMP i686 // Apache 2.0 Handler // 5.0.32-Dotdeb_1.dotdeb.1-log (client: 4.1.15) // 5.2.1-0.dotdeb.1 // 9.1.2.1


post the blocks code here...

AKA Akamu / Read these and your life will be successful | Find a Repair
--
Mods and Professional Support via YIM

Server specs (Server OS / Apache / MySQL / PHP / DragonflyCMS):
win32 / Apache 1.3.33 / MySQL 4.1.16/PHP 4.4/CPG-CVS ( browsers: Mozilla 1.7.x / IE6 / Opera 8.0)

All times are UTC
Go to page Previous 1, 2, 3, 4, 5, 6, 7 Next


Jump to: