Problems, need help? Have a tip or advice? Post it here.
5 posts Page 1 of 1
Hi,

I am testing CouchCMS on my localhost and everything went fine so far.
Now I want to implement the Comments feature.
I use the comments form from the documentation and get a error message when the form is processed.
It says:
Could not successfully run query: Incorrect integer value: '' for column 'user_id' at row 1
It seems that the database query failed because of empty value of 'user_id'.
Therefore this only happens when no user is logged in.

Is this a problem with my database setup?

Greetings,
Klaus
Hi Klaus,

Thank you very much for informing us of this error.

It seems to be cropping up because your MySQL sever is running in an 'SQL Mode' that is incompatible with the way Couch has been coded (please see http://dev.mysql.com/doc/refman/5.0/en/ ... -mode.html).

It happens only rarely (in fact this is the first such report we've had), however since we now know that this can happen, we'll certainly take anticipatory steps to prevent it from occurring.

For now, I am attaching a patch. Please overwrite the 'db.php' file in your Couch installation with this attached version.
Kindly do let me know if this fixes your problem.

Thanks again.

Attachments

Hi,

thank you for your help. The patched 'db.php' fixes the problem. :)

I have found enabled the SQL Mode 'STRICT_TRANS_TABLES' in the 'my.ini' file as default configuration.
I can easily disable it when it is unusual to be enabled.

But now I have another problem with the pagination of the comments. :(
To test the pagination I set the comments tag as follows:

Code: Select all
<cms:comments   page_id = k_page_id
                limit = '1'
                pagination = '1'>

Although I have 3 comments for the post, the pagination doesn't work.
Here are the variables set by the comments tag:
Code: Select all
k_total_records: 3
k_current_record: 1
k_absolute_count: 1
k_record_from: 1
k_record_to: 1
k_total_pages: 3
k_current_page: 1
k_paginate_limit: 1
k_paginated_top: 1
k_paginated_bottom: 1
k_paginator_required: 0
k_paginate_link_next:
k_paginate_link_prev:

I would be glad if you could help.

Greetings,
Klaus
Hi Klaus,

I am glad the fix worked.

As for the second problem you mentioned (about the pagination not working ), the solution is pretty easy -
use paginate='1' instead of the pagination = '1' that you are currently using :)

Hope this helps.
Ooops,
that was my fault! :oops:

But anyway thank you very much for your quick help!
5 posts Page 1 of 1

Who is online

In total there are 3 users online :: 0 registered, 0 hidden and 3 guests
(based on users active over the past 5 minutes)

Users browsing this forum: No registered users and 3 guests