Topics

RSS 2.0 Issue when Cancelling Log Entry


Ron Wright - KA5LUG
 

When I choose the option to add a new log entry, If I click the Icon to Cancel, it return to the main log screen as it should but all of my log entries are gone.  I have confirmed this happens every time I click the cancel option.

Thoughts?

--Ron, KA5LUG


Howard Nurse, W6HN
 

Hi Ron,

I can’t repeat what you are seeing at this end, Cancel works as it should.  If you’d like I can log in to your RigPi to see what is happening.  Please send your WAN IP and log in credentials by private email.

—Howard


Ron Wright - KA5LUG
 
Edited

Thanks for the offer but I haven't yet made this instance available outside the local network.  I'm still testing.

I did confirm through phpmyadmin that the rows are really being removed from the database when I cancel from the log entry screen.

Upon a little more digging I found the cancel button code is calling deleteTempQSO.php which includes the following in the where clause:  $db->where('ID',-1);

<?php
 
/**
 * @author Howard Nurse W6HN
 * 
 * This routine deletes all or selected contacts from the logbook
 * 
 * It must live in the programs folder   
 */
 
ini_set('error_reporting', E_ALL);
ini_set('display_errors', 'on');
$whichLogName=$_POST['name'];
require_once ("/var/www/html/programs/sqldata.php");
require_once("/var/www/html/classes/MysqliDb.php");     
$db = new MysqliDb("localhost", $sql_log_username, $sql_log_password, $sql_log_database);
if (!$db){
        die("Connection failed: ".mysqli_connect_error());
}
$db->where('Logname',$whichLogName);
$db->where('ID',-1);
$db->delete('Logbook');
echo "OK";
                ?>


Looking at the entries in my Station.Logbook table, they all have an id of -1.

 


Howard Nurse, W6HN
 

Good sleuthing, Ron.  The records obviously should not have their ID set to -1 after saving.  The trick is to find out why it is happening on your system and not others that I know of.  Once you set your router set up to access RigPi form the outside, I'd like to log in to isolate the problem.  How are you saving the contacts that are eventually being deleted?

--Howard


Ron Wright - KA5LUG
 

Nothing special. I search for the call using the search box In the header. Once it appears I close the pop up and click the plus sign to add new. I always click the button to fill in info from QRZ and then I click save. I have done no imports of old data from the fresh card image so it’s just test entries I’ve done so far. 


Howard Nurse, W6HN
 

I followed your steps and can repeat the problem here.  Now to find out why...  Thanks!

--Howard


Howard Nurse, W6HN
 

It is connected with populating the record from QRZ (or the FCC database).

--Howard


Howard Nurse, W6HN
 

OK, fixed.  I will add it to the the next update, but please give this a try:

In Terminal:

cd /var/www/html
sudo nano ./logEditor.php
scroll down to line 362 which says "dbRow['MobileID']=tID;"
Insert this below that line:

if (doAlert>0){
     dbRow['ID']=0;
}

ctrl+o to write, ctrl+x to exit.
Let me know if this fixes it for you.

--Howard


Ron Wright - KA5LUG
 

On Sun, Oct 11, 2020 at 07:20 PM, Howard Nurse, W6HN wrote:
if (doAlert>0){
     dbRow['ID']=0;
}

Looks good!  No more deletes.

Many Thanks!

--Ron, KA5LUG