crazyconzie Posted January 22, 2021 Report Posted January 22, 2021 Hello. I got the following error when filing a PIREP manually: Error! There was an error adding your PIREP : Schedule does not exist. Please update this manually. Before, I filed a PIREP via smartCARS, which said that the PIREP had filed, so when I went to the admin page to check the list of PIREPs, there was none added. So I tried the manual way and received the aforementioned error. Currently using phpvms version 5.5.2.72 simpilot/php7.2 Any help would be appreciated. Thanks, Conor. Quote
Administrators ProAvia Posted January 22, 2021 Administrators Report Posted January 22, 2021 Be aware that this is a v5 issue not v7 - your post has been moved to the v5 Support section. What MySQL or MariaDB version are you using? Quote
crazyconzie Posted January 23, 2021 Author Report Posted January 23, 2021 17 hours ago, ProAvia said: Be aware that this is a v5 issue not v7 - your post has been moved to the v5 Support section. What MySQL or MariaDB version are you using? I am using MySQL 5.7.33 Quote
Administrators ProAvia Posted January 23, 2021 Administrators Report Posted January 23, 2021 Is error reporting on? Any errors showing in error_log file? Any errors showing in the console? Quote
crazyconzie Posted January 23, 2021 Author Report Posted January 23, 2021 4 hours ago, ProAvia said: Is error reporting on? Any errors showing in error_log file? Any errors showing in the console? Yes, and there are no new errors in the error_log file. Quote
Administrators ProAvia Posted January 23, 2021 Administrators Report Posted January 23, 2021 Look in the console (F12) using Chrome. Chances are your host has Strict Mode on in MySQL 5.7 - ask them to turn it off. Quote
crazyconzie Posted January 24, 2021 Author Report Posted January 24, 2021 15 hours ago, ProAvia said: Look in the console (F12) using Chrome. Chances are your host has Strict Mode on in MySQL 5.7 - ask them to turn it off. index-0.js:3 Uncaught TypeError: Cannot read property 'getContext' of null at index-0.js:3 (anonymous) @ index-0.js:3 phpvms.js:27 Uncaught TypeError: $(...).ajaxForm is not a function at HTMLDocument.<anonymous> (phpvms.js:27) at j (jquery.min.js:2) at Object.fireWith [as resolveWith] (jquery.min.js:2) at Function.ready (jquery.min.js:2) at HTMLDocument.I (jquery.min.js:2) And I'll contact the host about that - thanks Quote
crazyconzie Posted January 24, 2021 Author Report Posted January 24, 2021 Just disabled strict mode, still no difference. Quote
Administrators ProAvia Posted January 24, 2021 Administrators Report Posted January 24, 2021 24 minutes ago, crazyconzie said: Just disabled strict mode, still no difference. Did you try filing a new manual PIREP and one thru smartCARS? Be sure that you enter data in each field. Also, switch back to the default crystal skin and try there too. Quote
crazyconzie Posted February 17, 2021 Author Report Posted February 17, 2021 On 1/24/2021 at 3:01 PM, ProAvia said: Did you try filing a new manual PIREP and one thru smartCARS? Be sure that you enter data in each field. Also, switch back to the default crystal skin and try there too. That's strange; I get the PIREP sent message in the website admin email "A PIREP has been submitted by x" and it says to approve it at a certain link. But when you go to the pending PIREPs page in the admin panel, there are no reports showing.., Quote
Strider Posted February 17, 2021 Report Posted February 17, 2021 This happened to me last year, I got the pirep has been filed but nothing there. Do any of the forms that insert data work? Try putting in the INSERT code INSERT IGNORE try see if that works, as that is how I fixed my problem. Quote
Administrators ProAvia Posted February 17, 2021 Administrators Report Posted February 17, 2021 On 1/24/2021 at 8:01 AM, ProAvia said: Did you try filing a new manual PIREP and one thru smartCARS? Be sure that you enter data in each field. Also, switch back to the default crystal skin and try there too. 2 hours ago, crazyconzie said: That's strange; I get the PIREP sent message in the website admin email "A PIREP has been submitted by x" and it says to approve it at a certain link. But when you go to the pending PIREPs page in the admin panel, there are no reports showing.., Did you try what I suggested above? It is unclear from your response. Quote
crazyconzie Posted February 18, 2021 Author Report Posted February 18, 2021 17 hours ago, Strider said: This happened to me last year, I got the pirep has been filed but nothing there. Do any of the forms that insert data work? Try putting in the INSERT code INSERT IGNORE try see if that works, as that is how I fixed my problem. Sorry, don't mean to be annoying but I'm not quite sure where the INSERT comes from? Quote
crazyconzie Posted February 18, 2021 Author Report Posted February 18, 2021 17 hours ago, ProAvia said: Did you try what I suggested above? It is unclear from your response. Yes, I tried default skin, smartCARS, manual, etc Quote
Administrators ProAvia Posted February 18, 2021 Administrators Report Posted February 18, 2021 6 hours ago, crazyconzie said: Sorry, don't mean to be annoying but I'm not quite sure where the INSERT comes from? So switching to default skin didn't work either.... You will need to dig into the code for PIREP filing. Once you locate that code, look for INSERT and replace with INSERT IGNORE Quote
crazyconzie Posted February 18, 2021 Author Report Posted February 18, 2021 (edited) 2 hours ago, ProAvia said: So switching to default skin didn't work either.... You will need to dig into the code for PIREP filing. Once you locate that code, look for INSERT and replace with INSERT IGNORE I found the line in; public static function addBid($pilotid, $routeid) { $pilotid = DB::escape($pilotid); $routeid = DB::escape($routeid); if (DB::get_row('SELECT bidid FROM ' . TABLE_PREFIX . 'bids WHERE pilotid=' . $pilotid . ' AND routeid=' . $routeid)) { return false; } $pilotid = DB::escape($pilotid); $routeid = DB::escape($routeid); $sql = 'INSERT IGNORE' . TABLE_PREFIX . 'bids (pilotid, routeid, dateadded) VALUES (' . $pilotid . ', ' . $routeid . ', NOW())'; DB::query($sql); self::setBidOnSchedule($routeid, DB::$insert_id); if (DB::errno() != 0) return false; return true; } which was located in SchedulesData.class.php Previously it was 'INSERT INTO ' (space after O intended) Is that it, or am I just reading something else? Otherwise, it made no difference. Edited February 18, 2021 by crazyconzie Quote
Administrators ProAvia Posted February 19, 2021 Administrators Report Posted February 19, 2021 That is addBid - and has nothing to do with PIREP filing Quote
crazyconzie Posted February 24, 2021 Author Report Posted February 24, 2021 On 2/19/2021 at 4:18 AM, ProAvia said: That is addBid - and has nothing to do with PIREP filing Found 1 other files but it was unrelated to filing... does anyone have any idea on where to look? Trying to find it is like a needle in a haystack. Thanks. Quote
Administrators ProAvia Posted February 24, 2021 Administrators Report Posted February 24, 2021 Maybe @Strider can assist in where to place the INSERT IGNORE Quote
crazyconzie Posted April 10, 2021 Author Report Posted April 10, 2021 On 2/24/2021 at 6:45 PM, ProAvia said: Maybe @Strider can assist in where to place the INSERT IGNORE Still no update? Quote
Strider Posted April 16, 2021 Report Posted April 16, 2021 You need to keep the INTO part the code should be INSERT IGNORE 'variables' INTO 'phpvms_pireps'; But are you 100% sure strict mode has been turned off? It is not easy to tell, but if your problem is still happening it most likely is still enabled. Shared hosts are reluctant to turn it off as others need it. Quote
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.