Open gbrn opened 3 weeks ago
Your log seems to be incomplete, share more about it
Also check if there is any plugin updates
[03-Nov-2024 20:46:09 America/Sao_Paulo] AVideoLog::ERROR: ObjectYPT::Error on save 2: ["Error","172.69.11.13","Mozilla\/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit\/537.36 (KHTML, like Gecko) Chrome\/109.0.0.0 Safari\/537.36",1730677569,1730677569,0,0,""] SCRIPT_NAME: /plugin/AD_Server/log.php
[03-Nov-2024 20:46:09 America/Sao_Paulo] AVideoLog::ERROR: ObjectYPT::Error on save 1: INSERT INTO vast_campaigns_logs ( `id`,`users_id`,`type`,`created`,`modified`,`vast_campaigns_has_videos_id`,`ip`,`user_agent`,`created_php_time`,`modified_php_time`,`videos_id`,`json`,`video_position`,`external_referrer` ) VALUES ( NULL , NULL , ? , now() , now() , NULL , ? , ? , ? , ? , ? , NULL , ? , ? ) Error : (0) [{"file":"\/var\/www\/html\/AVideo\/plugin\/AD_Server\/Objects\/VastCampaignsLogs.php","line":122,"function":"save","class":"ObjectYPT","type":"->"},{"file":"\/var\/www\/html\/AVideo\/plugin\/AD_Server\/log.php","line":34,"function":"save","class":"VastCampaignsLogs","type":"->"}] SCRIPT_NAME: /plugin/AD_Server/log.php
Common Error Description Error Context: The ObjectYPT::Error on save indicates that the system attempted to insert data into the vast_campaigns_logs table, but the save operation failed. SQL Insert Statement: The logs display an SQL INSERT statement where many of the values are NULL. Notably, users_id and vast_campaigns_has_videos_id are not provided, which could lead to database constraint violations if these fields are required. Database Error: The Error : (0) suggests that the error code from the database is 0, indicating that there might not be a specific SQL error code associated or that the error handling is not detailed enough to capture the issue properly. Detailed Error Path Error Location: The errors occur in the VastCampaignsLogs.php file, specifically at line 122, and are triggered by the save function. The error trace continues into log.php at line 34, which likely handles logging or additional processing of the VAST campaign data. User Agent and IP Information: Each error log also captures details about the client making the request, including IP addresses and user agents, which could be useful for identifying if the issue is caused by a particular client or pattern of access.
Possible Causes and Solutions Missing Required Fields: The errors may stem from NULL values for critical fields like users_id and vast_campaigns_has_videos_id. Ensure these fields are correctly populated before attempting to save data. Database Schema Issues: Check the database schema to ensure that constraints and default values align with what the application expects. For instance, if a users_id is required, consider modifying the logic to handle cases where this data is not available. Error Handling Improvements: The error code 0 suggests that error handling could be enhanced to capture more specific details about what went wrong. Updating the code to log more descriptive error messages could help diagnose the issue. Recommendations Investigate Client Patterns: Analyze the IP and user agent data to determine if specific clients are causing these errors. This could indicate a targeted problem or an attack attempt. Improve Data Validation: Before saving data, add validation to ensure that all necessary fields are present and correctly formatted. Review Database Constraints: Ensure that the database can handle the current set of data inputs and that there are no constraint violations causing the errors.
@DanielnetoDotCom Danny, please check:
Multiple ObjectYPT::Error on save errors occur when attempting to log data to vast_campaigns_logs.
Cause: These errors occur when attempting to execute an INSERT INTO statement unsuccessfully, possibly due to NULL values in required fields or database connection issues. Example: [28-Oct-2024 17:38:29]: Error saving campaign data with AdCompleted, AdThirdQuartile, etc. values.
Impact: Ad campaign data is not being logged correctly, impacting reporting and campaign tracking.
Resolution: Check campaign logs for missing required fields and adjust code to ensure all required data is present.