Go to main content

Textpattern CMS support forum

You are not logged in. Register | Login | Help

#1 2008-03-27 12:33:22

whaleen
Member
From: Portland
Registered: 2006-05-11
Posts: 373
Website

Error: '' is not an integer

I am completely baffled. I’m desperate for a fix. This is plaguing several of my sites. Has anyone come across this – I get the following when posting a new article:

Warning:

Error: ‘’ is not an integer

textpattern/include/txp_article.php:751 assert_int()
textpattern/include/txp_article.php:320 checkIfNeighbour()
textpattern/include/txp_article.php:235 article_edit()
textpattern/include/txp_article.php:51 article_save()
textpattern/index.php:104 include()

in /textpattern/lib/txplib_misc.php on line 1922

Warning: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ‘) order by Posted desc limit 1’ at line 1 select ID from textpattern where Posted < from_unixtime() order by Posted desc limit 1 in /textpattern/lib/txplib_db.php on line 84

Warning:

Error: ‘’ is not an integer

textpattern/include/txp_article.php:751 assert_int()
textpattern/include/txp_article.php:323 checkIfNeighbour()
textpattern/include/txp_article.php:235 article_edit()
textpattern/include/txp_article.php:51 article_save()
textpattern/index.php:104 include()

in /textpattern/lib/txplib_misc.php on line 1922

Warning: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ‘) order by Posted asc limit 1’ at line 1 select ID from textpattern where Posted > from_unixtime() order by Posted asc limit 1 in /textpattern/lib/txplib_db.php on line 84


txtstrap (Textpattern + Twitter Bootstrap + etc…)

Offline

#2 2008-03-27 13:48:15

ruud
Developer Emeritus
From: a galaxy far far away
Registered: 2006-06-04
Posts: 5,068
Website

Re: Error: '' is not an integer

Please post your diagnostics (mainly the TXP version and the installed plugins).

Offline

#3 2008-03-27 13:54:24

whaleen
Member
From: Portland
Registered: 2006-05-11
Posts: 373
Website

Re: Error: '' is not an integer

Textpattern version: 4.0.5 (r2466)
Last Update: 2008-02-02 01:22:40/2008-02-02 01:18:16
Document root: /var/www/vhosts/domain.com/httpdocs
$path_to_site: /var/www/vhosts/domain.com/httpdocs
Textpattern path: /var/www/vhosts/domain.com/httpdocs/textpattern
Permanent link mode: section_title
open_basedir: /var/www/vhosts/domain.com/httpdocs:/tmp
Temporary directory path: /tmp
Site URL: domain.com
PHP version: 5.2.5
GD Image Library: bundled (2.0.34 compatible); supported formats: GIF, JPG, PNG.
Server Local Time: 2008-03-27 06:51:10
MySQL: 5.0.22
Locale: en_GB.UTF-8
Server: Apache/2.2.3 (CentOS)
Apache version: Apache/2.2.3 (CentOS)
PHP Server API: apache2handler
RFC 2616 headers:
Server OS: Linux 2.6.9-023stab046.2-enterprise
Active plugins: hpw_admincss-0.1, zem_contact_lang-4.0.3.6m, zem_contact_reborn-4.0.3.19m, rei_show_custom-0.4, rss_admin_show_adv_opts-0.3, ied_hide_in_admin-0.1.6, Postmaster-0.4.2, Postmaster Library-0.2.1, tame_privs-0.1, sed_section_fields-0.1.85, azp_menugen-1.0rc, rss_auto_excerpt-0.5, srh_file_icon-0.1m, mah_lib_category_array-0.2.0, wow_menu-1.02

Pre-flight check:
————————————
Some Textpattern files have been modified: /include/txp_article.php, /lib/admin_config.php, /lib/txplib_head.php, /lib/txplib_html.php
————————————

.htaccess file contents:
————————————
#DirectoryIndex index.php index.html

#Options +FollowSymLinks
#Options -Indexes

<IfModule mod_rewrite.c> RewriteEngine On #RewriteBase /relative/web/path/

RewriteCond %{REQUEST_FILENAME} -f [OR] RewriteCond %{REQUEST_FILENAME} -d RewriteRule ^(.+) – [PT,L]

RewriteRule ^(.*) index.php
</IfModule>

#php_value register_globals 0
————————————


txtstrap (Textpattern + Twitter Bootstrap + etc…)

Offline

#4 2008-03-27 14:05:44

ruud
Developer Emeritus
From: a galaxy far far away
Registered: 2006-06-04
Posts: 5,068
Website

Re: Error: '' is not an integer

Please upgrade to TXP 4.0.6 first. If that doesn’t help, try disabling all plugins.

Offline

#5 2008-03-27 14:21:49

whaleen
Member
From: Portland
Registered: 2006-05-11
Posts: 373
Website

Re: Error: '' is not an integer

I upgraded to 4.0.6 (r2805) and, again, when attempting to post an article, I am getting a new error now. I then disable all plugins and still get the same error

Warning: Duplicate entry ‘0’ for key 1 insert into textpattern set Title = ‘can it go’, Body = ‘is this work’, Body_html = ‘

is this work
‘, Excerpt = ‘’, Excerpt_html = ‘’, Image = ‘’, Keywords = ‘’, Status = 4, Posted = from_unixtime(1206627242), LastMod = now(), AuthorID = ‘joshuavaage’, Section = ‘help’, Category1 = ‘’, Category2 = ‘’, textile_body = 1, textile_excerpt = 1, Annotate = 0, override_form = ‘’, url_title = ‘can-it-go’, AnnotateInvite = ‘’, custom_1 = ‘’, custom_2 = ‘’, custom_3 = ‘’, custom_4 = ‘’, custom_5 = ‘’, custom_6 = ‘’, custom_7 = ‘’, custom_8 = ‘’, custom_9 = ‘’, custom_10 = ‘’, uid = ‘d7a905aaea514847c275f5ac03e341db’, feed_time = now() in /var/www/vhosts/domain.com/httpdocs/textpattern/lib/txplib_db.php on line 81


txtstrap (Textpattern + Twitter Bootstrap + etc…)

Offline

#6 2008-03-27 14:32:36

ruud
Developer Emeritus
From: a galaxy far far away
Registered: 2006-06-04
Posts: 5,068
Website

Re: Error: '' is not an integer

Hmm… looks similar to the problem that is explained (and solved) in this post

Offline

#7 2008-03-27 15:19:51

whaleen
Member
From: Portland
Registered: 2006-05-11
Posts: 373
Website

Re: Error: '' is not an integer

Thanks Ruud. Much appreciated. That link looks like it has my answer. It was the missing auto_increment from the following tables:

textpattern => ID
txp_category => id
txp_discuss => discussid
txp_file => id
txp_image => id
txp_lang => id
txp_link => id
txp_log => id
txp_users => user_id

I don’t know how I missed those previous posts. Thanks again.

Last edited by whaleen (2008-03-29 11:14:06)


txtstrap (Textpattern + Twitter Bootstrap + etc…)

Offline

Board footer

Powered by FluxBB