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

        jonathan Jonathan Reissmueller created issue -
        jonathan Jonathan Reissmueller made changes -
        Field Original Value New Value
        Rank Ranked higher
        jonathan Jonathan Reissmueller made changes -
        Fix Version/s 5.5.0-b2 [ 11733 ]
        Fix Version/s 5.6.0-b1 [ 11730 ]
        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]\" ]',
        jonathan Jonathan Reissmueller made changes -
        Sprint 5.5.0-b2 Sprint 1 [ 161 ]
        jonathan Jonathan Reissmueller made changes -
        Sprint 5.5.0-b1 Sprint 1 [ 161 ] 5.5.0-b2 Sprint 1 [ 163 ]
        jonathan Jonathan Reissmueller made changes -
        Rank Ranked lower
        abdy Abdy Franco made changes -
        Assignee Abdy Franco [ abdy ]
        abdy Abdy Franco made changes -
        Status Open [ 1 ] In Progress [ 3 ]
        abdy Abdy Franco made changes -
        Remaining Estimate 0 minutes [ 0 ]
        Time Spent 2 hours, 4 minutes [ 7440 ]
        Worklog Id 15841 [ 15841 ]
        abdy Abdy Franco made changes -
        Status In Progress [ 3 ] In Review [ 5 ]
        Resolution Fixed [ 1 ]
        jonathan Jonathan Reissmueller made changes -
        Status In Review [ 5 ] Closed [ 6 ]

          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