Notifications
Clear all

[3.5] Errors when posting/updating story

38 Posts
20 Users
0 Reactions
11.7 K Views
 kali
(@kali)
Posts: 307
Reputable Member
Topic starter
 

URL to your eFiction: http://www.jonasbrothersfanfictionarchive.com
Version of eFiction: 3.5
Have you bridged eFiction, if so with what?: SMF
Version of PHP: 4.4.9
Version of MySQL: 5.0.67-log
Have you searched for your problem: No, as it  only started with 3.5 and there's only one other bug reported...
If so, what terms did you try:
State the nature of your problem:

Users get the following errors when attempting to post or update a story.

Query: SELECT author.realName AS penname FROM DBPREFIXfanfiction_coauthors AS c WHERE sid = '2400' LEFT JOIN smf_members as author AS a ON a.UIDFIELD = c.uid
Error: (1064) 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 'LEFT JOIN smf_members as author AS a ON a.UIDFIELD = c.uid' at line 1

The story WILL post, but it won't show up in the recent list, update the update date or send out the notices.

I tried what Tammy suggest here https://efiction.org/forums/index.php?topic=6674.0 but it didn't work.

User: testuser
PW: banana


Skins made by Kali are no longer supported!

 
Posted : 24/10/2008 12:09 am
(@chelle)
Posts: 122
Estimable Member
 

Have you tried this suggestion by Steffen:

https://efiction.org/forums/index.php?topic=6674.msg35795#msg35795

My guess would be something with DBPREFIX not having the right syntax


 
Posted : 24/10/2008 2:52 pm
 kali
(@kali)
Posts: 307
Reputable Member
Topic starter
 

https://efiction.org/forums/index.php?topic=6674.msg35796#msg35796

The error he can't fix is the one that's in quotes up there.


Skins made by Kali are no longer supported!

 
Posted : 24/10/2008 3:05 pm
 Elle
(@jenny)
Posts: 594
Honorable Member
 

Did you change the DBPREFIX to _TABLEPREFIX, though?


archive: dramione.org
site: accio.nu

Available for skin/mod commission! 🙂

 
Posted : 24/10/2008 3:27 pm
 kali
(@kali)
Posts: 307
Reputable Member
Topic starter
 

Yes. That's not the problem here, unfortunately.

Query: SELECT author.realName AS penname FROM fanfiction_coauthors AS c WHERE sid = '2400' LEFT JOIN smf_members as author AS a ON a.author.ID_MEMBER = c.uid
Error: (1064) 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 'LEFT JOIN smf_members as author AS a ON

Same message, just cleaned up some.


Skins made by Kali are no longer supported!

 
Posted : 24/10/2008 4:51 pm
(@wayka)
Posts: 1
New Member
 

I have exactly same problem (though it gives me slightly different Error).
I just want to check up if someone have an idea how to fix it.


 
Posted : 26/10/2008 8:20 am
(@guest1448)
Posts: 0
 

OK, since nobody seems to be able to fix the problem, I have downgraded my stories.php to 3.4.3 and now everything works fine.

Steffen


 
Posted : 05/11/2008 6:24 am
(@calash)
Posts: 180
Estimable Member
 

I was able to bypass whis problem by putting the story.php file from 3.4.3 in place.  Not the best solution but it is working for the moment.


The World of Necrotania - Story Writing Community

 
Posted : 09/11/2008 1:24 pm
 Saya
(@saya)
Posts: 30
Eminent Member
 

I tried to put that one too, but it didn't work...
we still have this HUGE problem


URL to your eFiction: http://kawaii-hito.org/fic/index.php and http://www.silverblood.net/MS
Your version of eFiction: 3.5
Latest patch: YES
Mods: only Challenges and translated to Italian
Version of PHP: 4.3.11
Version of MySQL: 4

 
Posted : 09/11/2008 1:35 pm
 Myr
(@myr)
Posts: 11
Active Member
 

I had the same issue but I used Calash's suggestion and used the old story.php file.


 
Posted : 23/11/2008 2:49 pm
(@hobert)
Posts: 61
Trusted Member
 

I've been playing with this at lunch today, and came to the following conclusions.  Be aware I am updating an existing 3.4.3 installation.

One.  All the examples I googled for LEFT JOIN that use a WHERE statement have the WHERE statement at the end.  Moving the WHERE statement makes the SQL error occur a little further down the code.  Therefore, for me, the WHERE statement was causing the first problem.

Two.  By this point in the scipt, ._AUTHORTABLE resolves to "fanfiction_authors as author" and ._UIDFIELD resolves to "author.uid" for whatever reason.  Hence the very strange line of code in the error:

LEFT JOIN fanfiction_authors as author AS a ON a.author.uid = c.uid 

Several AS's and the strange a.author.uid (a=author, as well).  Removing the double "a" (AS a & a.) keeps mysql from throwing a fit.

Soooo, edit stories.php and change the four instances of

$coQuery = dbquery("SELECT ".PENNAMEFIELD." AS penname FROM ".DBPREFIX."fanfiction_coauthors AS c WHERE sid = '$sid' LEFT JOIN "._AUTHORTABLE." AS a ON a.".UIDFIELD." = c.uid");

(assuming you have not changed DBPREFIX to TABLEPREFIX, nor .PENNAME to ._PENNAME and UIDFIELD to ._UIDFIELD yet) to

$coQuery = dbquery("SELECT "._PENNAMEFIELD." AS penname FROM ".TABLEPREFIX."fanfiction_coauthors AS c LEFT JOIN "._AUTHORTABLE." ON "._UIDFIELD." = c.uid WHERE sid = '$sid'");

This is allowing new/updating stories.  No idea if this will affect anything else.  No idea if it causes problems with co-authors (I do not use them).  No idea why a fresh install doesn't have this problem (and I checked database files hunting for any difference).  Hope this helps in some way, or at least points better minds in the right direction.  As it is, I may hold off updating just a little while longer.  Or try the substitute 3.4.3 stories.php for now.


efiction - 3.5.3
MySql - 5.5.32
php - 5.5.22
Linex - Apache 2.2.17
Hosted by: Fatcow!
http://www.hobert.net/fic/

 
Posted : 25/11/2008 5:55 pm
(@elaine)
Posts: 8
Active Member
 

hi,

i'm using ver 3.5 and getting this error:

Query: SELECT PENNAMEFIELD AS penname FROM DBPREFIXfanfiction_coauthors AS c WHERE sid = '5' LEFT JOIN fanfiction_authors as author AS a ON a.UIDFIELD = c.uid
Error: (1064) 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 'LEFT JOIN fanfiction_authors as author AS a ON a.UIDFIELD = c.uid' at line 1

i've found if i turn off automatic validation, then i won't get the error, but that means i have to validate every story. i've tried putting myself on the list of validated members but otherwise not auto validating and i still get the error. the only way i can avoid it is to not auto validate in any way. since the archive is only for my own stories, i can deal with that, but i also have a site with multiple authors and i really can't manually validate all of them.

i'd really like to get a fix for this one so i can update my multi author archive to the latest version. the other archive is on ver 3.4.3 and has no problem with auto validation.


 
Posted : 03/12/2008 12:09 am
(@elaine)
Posts: 8
Active Member
 

i've also found that the stories are being added as chapters, not complete stories, even tho i mark them as completed. this is regardless of whether i cut and paste into the story text field or upload a file. so under my profile it says i have 0 stories uploaded. the site stats said i have 0 stories and 12 chapters. i tried deleting the stories so i could reload them after changing the stories.php to the 3.4.3 version, and now i have -12 stories listed and fixing the story count in maintenance doesn't help.

so i guess i'm going to take the archive down and install 3.4.3 instead.


 
Posted : 03/12/2008 12:39 am
(@lyndsie)
Posts: 1263
Member Moderator
 

I had similar issues when I upgraded from 3.4.3 to 3.5. Check out the link in the second post in this thread; there's some suggestions for changes to stories.php.  Others have said that overwriting stories.php with the 3.4.3 version is working, though of course could compromise security.  (But only one file at version 3.4.3 may be better than all of them.)

When I ran the upgraded, most of the database modifications didn't actually run, so I had to do it manually.  You might look into that as well.  I think I saw others that had some problems with this too.


 
Posted : 03/12/2008 1:16 am
(@sailordraco)
Posts: 14
Active Member
 

I have a new installation and the same problem:

A fatal MySQL error was encountered.
Query: SELECT PENNAMEFIELD AS penname FROM DBPREFIXfanfiction_coauthors AS c WHERE sid = '9' LEFT JOIN smfanfiction_authors as author AS a ON a.UIDFIELD = c.uid
Error: (1064) 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 'LEFT JOIN smfanfiction_authors as author AS a ON a.UIDFIELD = c.uid' at line 1

animeaddictcentral.com/sailormoon

I tried Hoberts  suggestion and it did not work for me. I checked my database and everything came out okay.
PHP version 5.2.5
MySQL version 4.1.22-standard

Edit:

Now I am also receiving these errors:

Notice: Use of undefined constant PENNAMEFIELD - assumed 'PENNAMEFIELD' in /home/amimead/public_html/sailormoon/stories.php on line 309

Notice: Use of undefined constant DBPREFIX - assumed 'DBPREFIX' in /home/amimead/public_html/sailormoon/stories.php on line 309

Notice: Use of undefined constant UIDFIELD - assumed 'UIDFIELD' in /home/amimead/public_html/sailormoon/stories.php on line 309
A fatal MySQL error was encountered.
Query: SELECT PENNAMEFIELD AS penname FROM DBPREFIXfanfiction_coauthors AS c WHERE sid = '9' LEFT JOIN smfanfiction_authors as author AS a ON a.UIDFIELD = c.uid
Error: (1064) 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 'LEFT JOIN smfanfiction_authors as author AS a ON a.UIDFIELD = c.uid' at line 1

 
Posted : 04/12/2008 9:50 pm
Page 1 / 3
Share: