Textpattern CMS support forum
You are not logged in. Register | Login | Help
- Topics: Active | Unanswered
#1 2006-11-03 11:20:44
- Vaz
- New Member
- Registered: 2004-05-28
- Posts: 5
SQL Errors when posting an article.
This errror crops up when upgraded to TX4.0.4.
When I post an article I get those errors at the top. The article is posted in anycase.
Warning:
Error: ‘’ is not an integer
textpattern/include/txp_article.php:742 assert_int()
textpattern/include/txp_article.php:313 checkifneighbour()
textpattern/include/txp_article.php:131 article_edit()
textpattern/include/txp_article.php:49 article_post()
textpattern/index.php:104 include(/../textpattern/include/txp_article.php)
in /../textpattern/lib/txplib_misc.php on line 1842
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:742 assert_int()
textpattern/include/txp_article.php:316 checkifneighbour()
textpattern/include/txp_article.php:131 article_edit()
textpattern/include/txp_article.php:49 article_post()
textpattern/index.php:104 include(/../textpattern/include/txp_article.php)
in /../textpattern/lib/txplib_misc.php on line 1842
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
Article posted
TX worked like champ during early beta days. Only 4.0.4 has this issue.
Offline
Re: SQL Errors when posting an article.
- do you get this error every time you save/publish an article?
- does it only happen with new articles or only when you edit an article … or both?
- Please post your full diagnostics here (admin -> diagnostics)
Last edited by ruud (2006-11-03 11:37:18)
Offline
#3 2006-11-03 11:48:40
- Vaz
- New Member
- Registered: 2004-05-28
- Posts: 5
Re: SQL Errors when posting an article.
Every time save/publish without fail. Only new articles. editing them doesn’t generate that error. Only new articles.
Offline
#4 2006-11-03 14:08:26
- Mary
- Sock Enthusiast
- Registered: 2004-06-27
- Posts: 6,236
Re: SQL Errors when posting an article.
Did you modify the admin in any way? Have any plugins running?
It looks like it is trying to make links to next/previous articles, when it shouldn’t be doing that at all.
Offline
Re: SQL Errors when posting an article.
This is the second time this problem was reported. First time was here
Perhaps we can find a clue in the full diagnostics (admin -> diagnostics), because there has to be something that makes this installation different from all the others that work correctly.
Offline
#6 2006-11-04 06:11:00
- root
- Member
- From: Manila, Philippines
- Registered: 2004-05-31
- Posts: 48
Re: SQL Errors when posting an article.
Seems I’m not alone! =P Just did a quick search and the error seems a bit similar to this.
Offline
#7 2006-11-04 16:11:55
- Mary
- Sock Enthusiast
- Registered: 2004-06-27
- Posts: 6,236
Re: SQL Errors when posting an article.
…the error seems a bit similar to this.
That is just the same error name, it’s actually quite a different problem.
Here, Textpattern seems to think you’re not creating a new article, and so it is trying to make links to the next/previous article. But, of course, there isn’t one because the article has not been added yet.
The only reason it should be doing that is if $step is not set properly. Hence my asking if any files have been modified and what plugins you have installed.
Could you both please post your entire or “High” diagnostics?
Offline
#8 2006-11-05 03:15:24
- root
- Member
- From: Manila, Philippines
- Registered: 2004-05-31
- Posts: 48
Re: SQL Errors when posting an article.
Here’s mine, Mary:
Textpattern version: 4.0.4 (r1951)
Last Update: 2006-10-17 16:26:10/2006-10-17 16:25:37
Document root: /home/moonsha/public_html/beyond
$path_to_site: /home/moonsha/public_html/beyond/root/txp
Textpattern path: /home/moonsha/public_html/beyond/root/txp/textpattern
Permanent link mode: messy
Temporary directory path: /home/moonsha/public_html/beyond/root/txp/textpattern/tmp
Site URL: beyond-sanity.org/root/txp
PHP version: 4.4.2
Register globals: 1
Server Local Time: 2006-11-04 22:11:35
MySQL: 4.1.21-standard
Locale: en_GB.UTF-8
Server: Apache/1.3.36 (Unix) mod_auth_passthrough/1.8 mod_log_bytes/1.2 mod_bwlimited/1.4 FrontPage/5.0.2.2635.SR1.2 mod_ssl/2.8.27 OpenSSL/0.9.7a PHP-CGI/0.1b
PHP Server API: cgi
RFC 2616 headers:
Server OS: Linux 2.4.26-ow3
Active plugins: asy_dashboard-0.6m, asy_captcha-1.0
Pre-flight check:
------------------------
Some Textpattern files have been modified: /lib/txplib_head.php
The following PHP functions (which may be necessary to run Textpattern) are disabled on your server: wget
------------------------
.htaccess file contents:
------------------------
#DirectoryIndex index.php index.html
#Options +FollowSymLinks
#RewriteBase /relative/web/path/
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteCond %{REQUEST_FILENAME} -f [OR]
RewriteCond %{REQUEST_FILENAME} -d
RewriteRule ^(.+) - [PT,L]
RewriteRule ^(.*) index.php
</IfModule>
#php_value register_globals 0
------------------------
Charset (default/config): latin1/
character_set_client: latin1
character_set_connection: latin1
character_set_database: latin1
character_set_results: latin1
character_set_server: latin1
character_set_system: utf8
character_sets_dir: /usr/share/mysql/charsets/
19 Tables: OK
PHP extensions: xmlrpc/0.51, xml, wddx, tokenizer/0.1, standard/4.4.2, sockets, session, pspell, posix, overload, mysql, mhash, mcrypt, mbstring, gettext, gd, ftp, exif/1.4 $Id: exif.c,v 1.118.2.37.2.4 2006/01/01 13:46:52 sniper Exp $, domxml/20020815, curl, ctype, calendar, bcmath, zlib/1.1, pcre, openssl, Zend Optimizer
/include/txp_category.php: r1879 (aa84dc76082b0227a2b84cb5028c5ff2)
/include/txp_plugin.php: r1917 (def1c6926df4dd5ef4fa607655bef350)
/include/txp_auth.php: r1879 (f84d0af5836156c5f10e503e19eea592)
/include/txp_form.php: r1913 (b41e377f44b03b7127d9c83b4cf08559)
/include/txp_section.php: r1891 (8085ac2980f510c1edb8023c059a4f2d)
/include/txp_tag.php: r1915 (434b53e6d7d7edeffb6c3386117c8382)
/include/txp_list.php: r1892 (8dcd73ec065ae5f0646a4e7e6d3da4d4)
/include/txp_page.php: r1913 (0b454b359aa189e066c22ffa5db49422)
/include/txp_discuss.php: r1909 (e3e8b3033c04ee02d5a2fab5a918fc3d)
/include/txp_prefs.php: r1946 (9b9a5df2ea126e157495bebcb4673fb1)
/include/txp_log.php: r1919 (0d8990043f8b8d3d6f144eb8aa7ece1f)
/include/txp_preview.php: r1238 (5d3f54eeb736dc7cde1ae8d269d7ed37)
/include/txp_image.php: r1922 (a47c37636b7a2bedc4b15208af7a6dfd)
/include/txp_article.php: r1889 (f6d150d49ccbf5c2676892271ebd97e4)
/include/txp_css.php: r1897 (62a795fc0bde840125fc5222252c974d)
/include/txp_admin.php: r1879 (2877d7d092f0812c7956313408d79834)
/include/txp_link.php: r1879 (c1ea6a187e4f314e108cef85e6fe3157)
/include/txp_diag.php: r1902 (c8185f20380666dba2e261cf1e026bf1)
/include/txp_file.php: r1895 (35faafb0d5eb0fb5e3ee0fa436eeef27)
/include/txp_import.php: r1238 (e5e41b797bc26018755828fe7b2f5f11)
/lib/admin_config.php: r1747 (f9c6ea27f665cd037d31c06ed54b3514)
/lib/txplib_misc.php: r1932 (111499e2c5788e2f94d868bf22ae933f)
/lib/taglib.php: r1535 (5efb10c2638b6671ec3a47099cc428cd)
/lib/txplib_head.php: r1887 (71821f055e88deb79bf845389796fb64)
/lib/classTextile.php: r1943 (0464f2ea4fce419a90e9db6fe72376b2)
/lib/txplib_html.php: r1937 (e4e0c59111bd245f47f4678e8981f74a)
/lib/txplib_db.php: r1879 (142f3d8eaf1e6e4aa120622925c1c8df)
/lib/IXRClass.php: r765 (2efb0fb05b55c634072b0bae9af38bdd)
/lib/txplib_forms.php: r1887 (1c7e8d0e03b1033b5b660129d2b71725)
/lib/class.thumb.php: r1879 (78e4339bb1d65978b1c57698d1bf3f49)
/lib/constants.php: unknown (0e40251c717c52b2b7fe992b62a3e97a)
/lib/txplib_update.php: r1239 (813b996fd418da19242d7bc07d66bdf5)
/lib/txplib_wrapper.php: unknown (584448787b4a3488200722672c0eee0d)
/publish/taghandlers.php: r1949 (84480d420e13ca1860e7af9dcbdc4946)
/publish/atom.php: r1864 (8b51c019578514c6e0765cb11024b689)
/publish/log.php: r1637 (91f4ca2e4a9bd0a5a90e319646620a8e)
/publish/comment.php: r1951 (6d9994735584048031c4d834129c53af)
/publish/search.php: r1748 (1f3b5b2dffa90ccf597959b1b0e975ff)
/publish/rss.php: r1864 (c48e432b1e7ccfe06de06842249f125d)
/publish.php: r1945 (516bb917dbf2d388dd08016acf61b3c3)
/index.php: r1948 (5f9d0798381aacb14671f2dba3832e5c)
/css.php: r944 (df1c754417bdfb4e97a2c83ae5b454ee)
Thanks :)
Offline
#9 2006-11-05 05:33:04
- Mary
- Sock Enthusiast
- Registered: 2004-06-27
- Posts: 6,236
Re: SQL Errors when posting an article.
Could you please restore textpattern/lib/txplib_head.php with a fresh copy from the zip, and then try creating a new article?
Offline
#10 2006-11-05 06:34:25
- root
- Member
- From: Manila, Philippines
- Registered: 2004-05-31
- Posts: 48
Re: SQL Errors when posting an article.
I’m not sure if that’d change anything, cause the error occured before I started using philippe’s mod. I tried it though, and created a couple of test articles, and the error didn’t pop up again. As I said in the other thread however, the error doesn’t always happen with me…
I’ll report back if it happens again :) Thanks for the help!
Offline
#11 2006-11-06 06:52:09
- Vaz
- New Member
- Registered: 2004-05-28
- Posts: 5
Re: SQL Errors when posting an article.
Never used mods on my tx installation. I removed inactive plugin that was there for a while (dru_random_text) and the problem I described goes away and every works like fine. Added some articles after that plugin removal, all fine.
Thanks everyone for making tx the one of best software around.
Offline
Re: SQL Errors when posting an article.
I removed inactive plugin that was there for a while (dru_random_text) and the problem I described goes away and every works like fine.
A deactivated plugin cannot have any effect, because the code is not loaded. When you say “inactive” do you mean you thought you did not useit, or was it actually turned off in the plugins-tabs?
It’s possible that ur removal of the plugin simply coincided with the problem going away. Can you please reinstall the plugin, and check if the error reappears? And try switching it on and off to see the effect appear and disappear.
Offline