It looks like there's still a DBPREFIX in there. It should be TABLEPREFIX.
I did that, thanks.
Now I'm still getting 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 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 smfanfiction_coauthors AS c WHERE sid = '5' 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
Did you go through this entire thread (linked above) and make all those changes? https://efiction.org/forums/index.php?topic=6674 It looks like it's the same issue.
I did all of that and I'm still receiving this error:
A fatal MySQL error was encountered.
Query: SELECT author.penname AS penname FROM smfanfiction_coauthors AS c WHERE sid = '5' LEFT JOIN smfanfiction_authors as author AS a ON a.author.uid = 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.author.uid = c.uid' at line 1
I was getting a similar error, and I think that was the one that was caused by the database not having been upgraded properly. I'd check yours against update.php and make sure all the changes were enacted. (Particularly check fanfiction_coauthors.)
A fatal MySQL error was encountered.
Query: SELECT PENNAMEFIELD AS penname FROM DBPREFIXfanfiction_coauthors AS c WHERE sid = '1' 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
Fresh 3.5 install... MySQL 5, PHP 5...
http://www.aftermagic.us/fanfiction/
🙁 Is there any SURE sure fix for this yet?
Not sure, no, but the best thing to do would be to follow the suggestions in this post: https://efiction.org/forums/index.php?topic=6674 For certain you've got dbprefix in there when it shouldn't. Also I suspect that in many cases it has to do with the fanfiction_coauthors table not being created/updated properly. (This has happened both times I've upgraded, at the very least.)
Good news - apparently the stories.php file in the 3.5 download is updated properly, because I re-downloaded the zip file and uploaded stories.php by itself, and it worked! I didn't have to edit any code. The changes were already made. 😀 Thanks for your help and patience!
I re-dowloded the file, but still get the error:
You must include the text of your story either as an upload or as input into the textarea.
before the update it worked normaly
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
No, the stories.php was NOT updated. If you look at the date on the file, it's still October.
While I did replace my stories.php with the one from 3.4, we're still having issues with multiple e-mails getting sent out for chapters that don't exist and other fun things.
Skins made by Kali are no longer supported!
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.uidSeveral 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.
That worked wonders and I so don't care if it creates other probs at this point... just that it allows to update stories is a godsend!
Jacynthe
Archives: http://fanfics.e-authors.net
Version: 3.5.3
Modified? Somewhat...
PHP: 5.3.3
MySQL: 5.0.91-community
I tried what hobert said but still i'm getting:
You must include the text of your story either as an upload or as input into the textarea.
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
hobert's fix worked for me so far...
now it apears this error
Query: SELECT PENNAMEFIELD AS penname FROM khficfanfiction_coauthors AS c WHERE sid = '24' LEFT JOIN khficfanfiction_authors as author AS a ON a.UIDFIELD = c.uid
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
now it apears this error
Query: SELECT PENNAMEFIELD AS penname FROM khficfanfiction_coauthors AS c WHERE sid = '24' LEFT JOIN khficfanfiction_authors as author AS a ON a.UIDFIELD = c.uid
You need to find and replace in stories.php as suggested in https://efiction.org/forums/index.php?topic=6674 , replace PENNAMEFIELD with ._PENNAMEFIELD and .UIDFIELD with ._UIDFIELD for starters. Depending on the resulting error, you may need to make my suggested modifications as well.
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/
