Forum Replies Created

Viewing 2 replies - 1 through 2 (of 2 total)
  • Thread Starter fwoit

    (@fwoit)

    @andrewsupport

    Hello,

    I have done as requested and here are my results. I activated the default Twenty Twenty-Four theme, disabled all plug-ins except PDF & Print, I updated PDF & Print to version 2.3.6, and I still get the same error. “500 – Internal server error” when trying to edit an existing page or create a new page. The debug log contains a very similar error of “[29-Dec-2023 16:07:27 UTC] PHP Warning: Trying to access array offset on value of type null in O:\WordPress\wp-content\plugins\pdf-print\pdf-print.php on line 636”. I can only assume it is the same section of code as on version 2.3.4 and 2.3.5 but it is just a few lines down in the php file now on version 2.3.6 since “Bugfix : Syntax errors fixed” are listed in the change log for the latest version.

    Thread Starter fwoit

    (@fwoit)

    For others having the same issue with the start and end poll dates being calculated incorrectly I’ve added 4 lines of code into the “Total-Soft-Poll-Widget.js” file to fix the issue. If you’d like to update the file yourselves here are the two updated functions that you would need to replace in the original file.

    function Total_Soft_Poll_Upcoming(Poll_ID) {
      var datereal=new Date(), currentMonth=datereal.getMonth() + 1, currentYear=datereal.getFullYear(),
        currentDay=datereal.getDate();
    
      var TotalSoft_Poll_Set_02=jQuery('#TotalSoft_Poll_Set_02_' + Poll_ID).val();
      var thisDate = TotalSoft_Poll_Set_02.split('-'); //added by fwoit 12-01-2020 to fix the issue with the poll start date being calculated as one day behind the actual selected user date in the poll settings. Splits yyyy-mm-dd into its various parts
      var TotalSoft_Poll_Set_02 = [thisDate[1],thisDate[2],thisDate[0] ].join("-"); //added by fwoit 12-01-2020 to fix the issue with the poll start date being calculated as one day behind the actual selected user date in the poll settings.  Reorganizes date as mm-dd-yyyy
      var datestart=new Date(TotalSoft_Poll_Set_02), startMonth=datestart.getMonth() + 1, startYear=datestart.getFullYear(),
        startDay=datestart.getDate();
    
      var Total_Soft_Poll_Upcoming_Bool=false;
      if(currentYear < startYear) {
        Total_Soft_Poll_Upcoming_Bool=true;
      }
      else if(currentYear==startYear) {
        if(currentMonth < startMonth) {
          Total_Soft_Poll_Upcoming_Bool=true;
        }
        else if(currentMonth==startMonth) {
          if(currentDay < startDay) {
            Total_Soft_Poll_Upcoming_Bool=true;
          }
        }
      }
    
      if(Total_Soft_Poll_Upcoming_Bool===true) {
        jQuery('.TotalSoftPoll_Ans_ComingSoon_' + Poll_ID).css('display', 'block');
      }
      else {
        jQuery('.TotalSoftPoll_Ans_ComingSoon_' + Poll_ID).css('display', 'none');
      }
    }
    
    function Total_Soft_Poll_End_Poll(Poll_ID, Poll_Type) {
      var datereal=new Date(), currentMonth=datereal.getMonth() + 1, currentYear=datereal.getFullYear(),
        currentDay=datereal.getDate();
    
      var TotalSoft_Poll_Set_03=jQuery('#TotalSoft_Poll_Set_03_' + Poll_ID).val();
      var thisDate = TotalSoft_Poll_Set_03.split('-'); //added by fwoit 12-01-2020 to fix the issue with the poll end date being calculated as one day behind the actual selected user date in the poll settings. Splits yyyy-mm-dd into its various parts
      var TotalSoft_Poll_Set_03 = [thisDate[1],thisDate[2],thisDate[0] ].join("-"); //added by fwoit 12-01-2020 to fix the issue with the poll end date being calculated as one day behind the actual selected user date in the poll settings.  Reorganizes date as mm-dd-yyyy
      var dateend=new Date(TotalSoft_Poll_Set_03), endMonth=dateend.getMonth() + 1, endYear=dateend.getFullYear(),
        endDay=dateend.getDate();
    
      var Total_Soft_Poll_End_Bool=false;
      if(currentYear > endYear) {
        Total_Soft_Poll_End_Bool=true;
      }
      else if(currentYear==endYear) {
        if(currentMonth > endMonth) {
          Total_Soft_Poll_End_Bool=true;
        }
        else if(currentMonth==endMonth) {
          if(currentDay > endDay) {
            Total_Soft_Poll_End_Bool=true;
          }
        }
      }
    
      if(Total_Soft_Poll_End_Bool===true) {
        if(Poll_Type=='Standart') {
          Total_Soft_Poll_Ans_Div1(Poll_ID);
        }
        else if(Poll_Type=='Image/Video') {
          Total_Soft_Poll_Ans_DivIm1(Poll_ID);
        }
        else if(Poll_Type=='StandartWB') {
          Total_Soft_Poll_Ans_DivSt1(Poll_ID);
        }
        else if(Poll_Type=='ImageWB/VideoWB') {
          Total_Soft_Poll_Ans_DivIV1(Poll_ID);
        }
        else if(Poll_Type=='ImageIQ/VideoIQ') {
          Total_Soft_Poll_Ans_DivSt1(Poll_ID);
        }
      }
    }

    I hope this helps others out there.

Viewing 2 replies - 1 through 2 (of 2 total)