Jump to content

Error! There was an error adding your PIREP : Schedule does not exist. Please update this manually.


crazyconzie

Recommended Posts

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. 

image.png

Link to comment
Share on other sites

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

Link to comment
Share on other sites

  • Administrators
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.

Link to comment
Share on other sites

  • 4 weeks later...
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..,

Link to comment
Share on other sites

  • Administrators
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.

Link to comment
Share on other sites

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?

Link to comment
Share on other sites

  • Administrators
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

Link to comment
Share on other sites

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 by crazyconzie
Link to comment
Share on other sites

  • 1 month later...

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.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
×
×
  • Create New...