Uploaded image for project: 'Blesta Core'
  1. Blesta Core
  2. CORE-4683

Pterodactyl: egg_id config option doesn't work

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 5.5.0-b2
    • Component/s: None
    • Labels:
      None

      Description

      Overriding egg_id with a config option doesn't seem to work at all.

      I'm not seeing fields being updated based on the selected option. It looks like the service fields load JS meant to re-fetch fields based on the egg selected but this JS doesn't seem to be functioning (see /pterodactyl/lib/pterodactyl_service.php in the getFields() method).

        Activity

        Hide
        jonathan Jonathan Reissmueller added a comment -

        In pterodactyl.php addService() and editService() move

                // Set configurable options
                $package = $this->getConfigurableOptions($vars, $package);
        

        Above

                // Load egg
                $pterodactyl_egg = $this->apiRequest(
                    'Nests',
                    'eggsGet',
                    ['nest_id' => $package->meta->nest_id, 'egg_id' => $package->meta->egg_id]
                );
        

        In /pterodactyl/lib/pterodactyl_service.php in the getFields() method change

                                '#configoption_$egg_id, #configoption_$nest_id, #configoption_$location_id',
        

        To

                                '*[name=\"configoptions[$egg_id]\"], *[name=\"configoptions[$nest_id]\"], *[name=\"configoptions[$location_id]\"]',
        
        Show
        jonathan Jonathan Reissmueller added a comment - In pterodactyl.php addService() and editService() move // Set configurable options $ package = $ this ->getConfigurableOptions($vars, $ package ); Above // Load egg $pterodactyl_egg = $ this ->apiRequest( 'Nests', 'eggsGet', ['nest_id' => $ package ->meta->nest_id, 'egg_id' => $ package ->meta->egg_id] ); In /pterodactyl/lib/pterodactyl_service.php in the getFields() method change '#configoption_$egg_id, #configoption_$nest_id, #configoption_$location_id', To '*[name=\ "configoptions[$egg_id]\" ], *[name=\ "configoptions[$nest_id]\" ], *[name=\ "configoptions[$location_id]\" ]',

          People

          • Assignee:
            abdy Abdy Franco
            Reporter:
            jonathan Jonathan Reissmueller
          • Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:
              Fix Release Date:
              13/Jul/22

              Time Tracking

              Estimated:
              Original Estimate - Not Specified
              Not Specified
              Remaining:
              Remaining Estimate - 0 minutes
              0m
              Logged:
              Time Spent - 2 hours, 4 minutes
              2h 4m

                Agile