I've just upgraded to 3.5 from 2.0.7 and whenever a story or chapter is submitted we're getting this:
A fatal MySQL error was encountered.
Query: SELECT PENNAMEFIELD AS penname FROM DBPREFIXfanfiction_coauthors AS c WHERE sid = '139' LEFT JOIN fics1fanfiction_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 fics1fanfiction_authors as author AS a ON a.UIDFIELD = c.uid' at line 1
The Stories are posting, but the author sees that error, and has to back up to get back to the site again.
I have not looked at my database because quite honestly I know nothing about MYSQL and have always just let the script do the work of adding and changing tables for me. If I have to change something, I'm going to need very simple detailed instructions on how to do it.
I upgraded to this version because when I needed help with problems with problems with the old version I was told you don't develop it anymore and I needed to upgrade to fix the problems...now I'm having considerably bigger problems.
I have debugging off because that caused a bunch of errors and turning it off was the only way to get rid of the errors.
When debugging's on it shows a bunch of smaller errors that aren't necessarily always really a problem, so most people keep it turned off except during development (like modding and stuff).
As for your problem, I don't think DBPREFIX is valid - it's normally TABLEPREFIX. Have you done any modifications? Are you sure that you successfully overwrote all the 2.0 files? I don't know how DBPREFIX would have made its way in there.
Anyway, you say it happens after a story is submitted, which made me think the problem is in viewstory.php. I'd overwrite it and see if it solves the problem.
I sort of figured that out with debugging since most errors vanished as soon as I shut it off.
I've not modded anything on this archive. My other archives that run 2.x and 1.1, yes, but this archive is new and has nothing modded.
As I went through the upgrade steps it said everything was successful. Everything had a check mark as it showed what was done so I'd assume it all worked properly. Do I delete DBPREFIX? I know nothing about MySQL and am seriously afraid to start deleting things and risk losing the site all together. I went through a lot of hassle to convince this particular fandom to use my site and now each suggestion I've tried as caused more damage. I started with 2.x not showing the respond to reviews link, followed someone's instructions to fix it and ended up with all my locked top level categories being the only working categories for uploading...so I upgraded as suggested to get help and now submissions aren't working properly.
this isn't my first eFiction site but it is the one I've had the most problems with...I know 3.5 is more secure but I'm starting to regret not sticking to 1.1 which I can install and use blindfolded...
I just tried reloading viewstory.php and it changed nothing.
Don't delete anything. But I'm curious. Did you find a file with DBPREFIX in it?
I answered your other question about submissions; there's not a problem there, I don't think.
In another post you said you had problems with submission rules not showing up. Is that the page itself or above the submission form? The rules don't show up for admins, but do for regular users, so that might be your issue.
I've not actually upgraded to 3.5 yet, so I'm downloading the folder to see what's going on. So far there's no dbprefix in viewstory.php.
(Sorry for double-posting!)
Found it. Lines 295, 309, 713, and 727 of 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");
You could try changing DBPREFIX to TABLEPREFIX, but I have no guarantee that'll work. I've never seen DBPREFIX, but that doesn't mean it's not meant to be in 3.5. I tried scoping it out, but that part of stories.php has been changed a little too much for me to be sure. But I'd say give it a try, and if it gives more or different errors, just overwrite back to the original file. (This is why I have a test site!)
ETA: https://efiction.org/forums/index.php?topic=6674
I'd follow those instructions also.
A file where? In the Database? I don't see anything.
Okay I made the changes to the story.php and I'm still getting errors, jus slightly different wording.
A fatal MySQL error was encountered.
Query: SELECT PENNAMEFIELD AS penname FROM fics1fanfiction_coauthors AS c WHERE sid = '150' LEFT JOIN fics1fanfiction_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 fics1fanfiction_authors as author AS a ON a.UIDFIELD = c.uid' at line 1
Same thing though, the story is there, the errors are jus showing up.
thanks for the help with teh submission problems. I wasn't sure if it was a problem but a mod emailed me about it. I don't click that link since you can't validate from there so I hadn't realized nothing showed up.
I fixed the submission rules thing. I did eventually figure out it doesn't show up for admins, but I wanted (and had with 2.x) a link in the menu and I wanted that back. I tried adding it in as I did with the ToS but it hadn't worked...but I ended up copying the variables file from a different skin that I had downloaded and it fixed it.
Well, it worked, so that's good. Your table prefix is fics1 and it's now appearing properly. I'd follow the rest of the suggestions in the other thread, and look around on those boards because there are a couple of other threads with the same issues.
I did the rest of the suggestions on that thread and the errors change slightly but the problem is still there.
I'm out of ideas for the time being, but I'm going to upgrade my test site tonight, so I'll get back to you after I do.
Thanks for all of your help. I do really appreciate it. If looking at my files and stuff will help at all you can email me (shannon730@gmail.com). It's all just frustrating me so much at this point...
I upgraded from 3.4.3 to 3.5 and I am having the same problem on two of my sites.
I've tried the fixes suggested in this topic, but I'm getting the same error still.
From what I can see, new stories will show up in the Most Recent page, but new chapters/updates will not.
eFiction Archives:
Lyndsee is working on seeing if she can fix the error problem.
I'm having that problem with the Most recent page as well. The chapter are uploading though, and if you go into the fic from antoher page they are there, they jsut arent' showing up as Most Recent.
Okay, some results.
Upgraded from 3.3.1 to 3.5. Had to create fanfiction_coauthors (not sure why it didn't exist). Once I did that, I got the same problem as you pointed out here. Then I made the changes in the thread I linked above, and it worked.
I had some trouble because it doesn't appear that the database changes were actually made even though it told me the update was successful, so I did them manually.
Everything appears to be normal. Site statistics were off for me for a bit since I had the database issues, but I recalculated them through the admin panel and it seems fine. When I added a new chapter to a pre-existing story, it is viewed in Most Recent, as well as the new story I added.
Thanks, Um...someone else tried to test it as well. So I uploaded with the test account...the problem seems to be admin uploads only. For both the most recent page and for the errors.
If the problem is only in the Admin section, maybe it's missing some files when you uploaded to your website. I would get a fresh copy of efiction 3.5 and only upload the following files from it:
Admin folder
admin.php
Maybe in the initial upload some of the files didn't get uploaded. I've had that happen before or maybe one file got corrupted but by replacing the file it can sometimes fix the problem.
******************************************
Mucking around in eFiction since circa 2001 (ver. 1.0)
Now running v.3
