I really wish I knew what I was doing wrong.
For the umpty-umph (big number :wink:) time I have tried the corrections listed here. And I'm still getting the same results.
If the Author is a "Validated" author, the Fatal Error message is generated when the story is first submitted.
If the Author is NOT "Validated" so that I (or my fellow admin) has to validate the story before it goes up, the error does not generate.
Admittedly, this isn't a bottleneck right now, since I'm not getting a lot of story submitted at the moment. However, it is going to become worse than just a bottleneck when I do start getting large numbers of submissions at a time.
Any ideas folks?
There is always more than one way to accomplish any job. True talent is picking the best way.
This thread's getting pretty long. You're probably better making your own. Especially since you haven't filled out the support request template (unless I missed it when I went through again), which might provide some useful info.
Anyway, I have a 3.5 site with Hobart's corrections, and I just uploaded a story as a validated, non-admin author with no problems. You can see my details in the footer, if maybe you think it could be a MySQL version issue.
To summarize what you need to do:
Find four lines that look like this (295, 309, 713, and 727, if you haven't modified stories.php):
$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");
Replace them all with this:
$coQuery = dbquery("SELECT "._PENNAMEFIELD." AS penname FROM ".TABLEPREFIX."fanfiction_coauthors AS c LEFT JOIN "._AUTHORTABLE." ON "._UIDFIELD." = c.uid WHERE sid = '$sid'");
This thread's getting pretty long. You're probably better making your own. Especially since you haven't filled out the support request template (unless I missed it when I went through again), which might provide some useful info.
Anyway, I have a 3.5 site with Hobart's corrections, and I just uploaded a story as a validated, non-admin author with no problems. You can see my details in the footer, if maybe you think it could be a MySQL version issue.
To summarize what you need to do:
Find four lines that look like this (295, 309, 713, and 727, if you haven't modified stories.php):
$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");Replace them all with this:
$coQuery = dbquery("SELECT "._PENNAMEFIELD." AS penname FROM ".TABLEPREFIX."fanfiction_coauthors AS c LEFT JOIN "._AUTHORTABLE." ON "._UIDFIELD." = c.uid WHERE sid = '$sid'");
I'm not sure how many times I've tried this and it didn't work. This time I got smart and instead of stepping through the line of code making changes, I just typed the entire line of corrected code in. Not sure what it was I kept missing the other way, but since it works now I will very happily settle for that.
Thank you for your time and patience.
datapard
There is always more than one way to accomplish any job. True talent is picking the best way.
I have an admin account on my own site, and for a while, was unable to update my stories due to this SQL error. I re-ran update.php (by going to http://drfa.seventh-star.net/update.php) and it seems to have fixed things, except my story still does not appear in the Recently Updated stories, nor does the proper update date show up in the story box (Updated: 04/05/09). However, when logged in using a non-admin Test Account, I can see the updated chapter just fine. The important thing is being able to add/edit stories without getting a fatal SQL error, but I'm wondering what is causing the update not to "stick" to certain parts of the database, e.g. the date fields.
Archive: Dragonfayth
eFiction: 3.5.5/6
Latest Patch(es): Yes
bridged?: No
modified?: Yes
PHP: 7.4.25
MySQL: 5.7.32-35-log
This thread's getting pretty long. You're probably better making your own. Especially since you haven't filled out the support request template (unless I missed it when I went through again), which might provide some useful info.
Anyway, I have a 3.5 site with Hobart's corrections, and I just uploaded a story as a validated, non-admin author with no problems. You can see my details in the footer, if maybe you think it could be a MySQL version issue.
To summarize what you need to do:
Find four lines that look like this (295, 309, 713, and 727, if you haven't modified stories.php):
$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");Replace them all with this:
$coQuery = dbquery("SELECT "._PENNAMEFIELD." AS penname FROM ".TABLEPREFIX."fanfiction_coauthors AS c LEFT JOIN "._AUTHORTABLE." ON "._UIDFIELD." = c.uid WHERE sid = '$sid'");I'm not sure how many times I've tried this and it didn't work. This time I got smart and instead of stepping through the line of code making changes, I just typed the entire line of corrected code in. Not sure what it was I kept missing the other way, but since it works now I will very happily settle for that.
Thank you for your time and patience.
datapard
Sometimes a little ' or " can make all of the difference in coding. Usually when replacing, what you want to do is copy and paste, not actually look at the code and type it in yourself. Just a future hint π
A fatal MySQL error was encountered.
Query: SELECT PENNAMEFIELD AS penname FROM DBPREFIXfanfiction_coauthors AS c WHERE sid = '129' LEFT JOIN settfanfiction_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 settfanfiction_authors as author AS a ON a.UIDFIELD = c.uid' at line 1
I have this with a fresh install of 3.5.1 I looked for the fix stated here and it's already applied. The story still posts. Yeah, this only occurs when a story successfully posts.
I am rebuilding efiction! Join us on irc! #efiction at
Itanshi I think you've got an old copy of stories.php on your site. Either you missed uploading the 3.5.1 version or if you're using your host's file manager it crapped out on you as they are prone to do and left the 3.5 version in place. I just checked the 3.5.1 stories.php file in the .zip and dbprefix appears nowhere in the file.
Ah, right, fixed now, thanks
I am rebuilding efiction! Join us on irc! #efiction at
