Forums / Cotonti / Support / Comments for Guests

error

pieter
#1 2009-04-06 15:00
I deinstalled ComCAPTCHA to use Comments for Guests (Cotonti)

When a guest or user submit a comment he gets this error:
Fatal error : SQL error : Unknown column 'page_comcount' in 'field list'

But the comment is submitted.
Is there something I missed during install?

-----------------------
Sorry, I have created this in wrong section, should be plugins.
... can we help you ...
This post was edited by pieter (2009-04-06 15:27, 15 years ago)
Kort
#2 2009-04-06 15:20
Ok, this is the latest version and recaptcha plugin that I am using on my website. Works just fine.
c4g-recaptcha_183.zip
Uninstall the version that you're having now and all installed captchas too.
And -- I recommend that you replace your system/xtemplate.class.php with the trunk version. This way you would be able to use template logic. Below is the code I'm using:

<!-- BEGIN: COMMENTS_NEWCOMMENT -->
<div class="block">
	<form action="{COMMENTS_FORM_SEND}" method="post" name="newcomment">
	<h4>{PHP.skinlang.comments.Comment}</h4>
	<table class="cells">
<!-- IF {PHP.usr.id} < 1 -->
		<tr>
			<td>{PHP.L.Name}:</td>
			<td>{COMMENTS_FORM_POSTER}</td>
		</tr>
<!-- ENDIF -->
		<tr>
			<td style="width:100px;">{PHP.L.Comment}:</td>
			<td><div style="width:100%;">{COMMENTS_FORM_TEXTBOXER}</div></td>
		</tr>
<!-- IF {PHP.usr.id} < 1 -->
		<tr>
			<td>Enter CAPTCHA code:</td>
			<td>
				{COMMENTS_FORM_VERIFY_IMG}
<!-- ENDIF -->
<!-- IF !{PHP.cfg.plugin.recaptcha.privatekey} AND {PHP.usr.id} < 1 -->
				<br />{COMMENTS_FORM_VERIFY}
<!-- ENDIF -->
<!-- IF {PHP.usr.id} < 1 -->
			</td>
		</tr>
<!-- ENDIF -->
		<tr>
			<td colspan="2" class="valid"><input type="submit" value="{PHP.skinlang.comments.Send}"></td>
		</tr>
	</table>
	</form>
</div>
<!-- END: COMMENTS_NEWCOMMENT -->

It's abit clumsy because nested conditions have not been implemented yet, but you get the idea, don't you?

Btw, very soon we're going to release CAPTCHA Manager Plugin that would enable you to install as many captchas as you like, switch between them 'on the fly' and randomize them in submission forms.
SED.by - создание сайтов, разработка плагинов и тем для Котонти
This post was edited by Kort (2009-04-06 15:27, 15 years ago)
pieter
#3 2009-04-06 15:30
Thanks,

I was digging around a bit in the database and I found that

`page_comcount` mediumint(8) unsigned default '0'
was in cotonti database from my fresh installed site
BUT NOT on my migrated site (So this table is not made with the migration)

I have put it into my database and problem solved.
alter table 'sed_pages' add column `page_comcount` mediumint(8) unsigned default '0';
... can we help you ...
Lombi
#4 2009-04-06 17:07
That's missing cause you forgot the 12x->125 conversion, comcount is created there.
<a href="http://www.domenlo.com">Surreal Art</a>
pieter
#5 2009-04-06 17:19
I thought I ran the script: upgrade-seditio12x-to-seditio125.php
But obviously it didn't, or not all of it.
... can we help you ...
foxhound
#6 2009-04-24 06:22
# pieter : Thanks,

I was digging around a bit in the database and I found that

`page_comcount` mediumint(8) unsigned default '0'
was in cotonti database from my fresh installed site
BUT NOT on my migrated site (So this table is not made with the migration)

I have put it into my database and problem solved.
alter table 'sed_pages' add column `page_comcount` mediumint(8) unsigned default '0';

Interesting as I suffer again the same thing. I am sure I ran the seditio updater so I am not sure what is going wrong there.
Anyway, I tried the above code and executing that in the sql does not work, it returns an error so I decided to manually add the row again.

Also another question, as somehow I think something is going wrong with upgrading to seditio 125, when I move my live site to cotonti, could I do all the necassary updates but import the cotonti DB first and than (after doing all the necassary changes) update that Cotonti DB with my own converted DB? That way even if the Seditio upgrade did skip some I would have all necassary rows and tables etc right? (be gentle, just a noob question)
<img src="http://www.armaholic.com/datas/thumbs/green-sea-battalion-uniforms-version-03-preview_4.jpg" alt="green-sea-battalion-uniforms-version-03-" />
Lombi
#7 2009-04-24 18:51
Adding comcount is one of the steps that the upgrader script does. It's not a SQL file because it then actually counts those comments and updates the pages.
<a href="http://www.domenlo.com">Surreal Art</a>
foxhound
#8 2009-04-24 23:48
Sorry, I think I did not make myself clear enough :-/

I mean, when you install a clean copy of cotonti and upload the empty cotonti database you will have everything in it what you need right? An empty DB with all tables and rows which are needed to run Cotonti.

Now, I know you think I did not update to Seditio 1.25 but lets forget that since we differ from opinion here.
Now, what happens when I upload the cotonti DB to my phpMyadmin (than I have all cotonti tables/rows right), than import my own DB (converted to cotonti) without the "dump" so it does not remove a thing but only imports the new data.
Would that work? Just so to make sure I have all required tables and rows in my DB.

I just want to know this as to me its clear there is a problem with the update process (maybe only for me and Pieter, but there clearly is) and when I move the live site I must know the best way to move things over.

Sorry to bother you about this :(
<img src="http://www.armaholic.com/datas/thumbs/green-sea-battalion-uniforms-version-03-preview_4.jpg" alt="green-sea-battalion-uniforms-version-03-" />
Lombi
#9 2009-04-26 04:32
Importing into the new structure wouldnt work since you'd get SQL errors (which would stop the import) the moment it would try to import an entry into a nonexistant column (columns were added and removed in the upgrade process).
<a href="http://www.domenlo.com">Surreal Art</a>