Jump to content

stocky789

Members
  • Posts

    3
  • Joined

  • Last visited

Everything posted by stocky789

  1. Problem: Pterodactyl game eggs occasionally have the below problem The setFields() method in /app/models/services.php doesn't handle duplicate field keys in the input array. When modules or package configurations pass duplicate service fields (same key), the method attempts to insert multiple records with the same service_id + key combination, causing a primary key constraint violation: Root Cause: In line ~4165, the method loops through $vars and calls addField() for each entry without checking for duplicate keys. If $vars contains multiple entries with the same key, multiple INSERT statements are executed for the same service_id + key, violating the primary key constraint. Solution: Add deduplication logic before processing the fields array. Here's the diff that fixed the problem and stopped white redirect pages from occurring: Benefits of this fix: 1. Prevents crashes: Eliminates primary key constraint violations 2. Maintains functionality: If duplicates exist, keeps the last occurrence (allows intentional overriding) 3. Backward compatible: No API changes, same input/output behavior 4. Future-proof: Protects against any module/package that might pass duplicate fields Affected scenarios: • Custom modules that generate duplicate service fields • Package configurations with conflicting field definitions • Third-party integrations (like Pterodactyl) with complex field mappings
  2. Sorry I did forget to add - that even though the redirect goes to a blank white page the pterodactyl integration still works and it will create a server based on the order. Its just confusing and unprofessional looking that you just get taken to this blank white page.
  3. Hey guys, Pretty new to Blesta but I've got it working with pterodactyl at the moment and I'm having this issue that appears to be with most eggs I've tried where you place an order for them and the redirect after activating/ordering the service goes to a blank white page. Is this some weird PHP issue? The logs aren't showing any errors so I don't really have much to go off at the moment to try and troubleshoot it. Any help would be appreciated, cheers!
×
×
  • Create New...