Jump to content

Jono

Blesta Developers
  • Posts

    376
  • Joined

  • Last visited

  • Days Won

    37

Posts posted by Jono

  1. I know it sounds cliche, and you already said they were correct, but I'd suggest double checking the credentials again.  The response you are seeing is the exact same one I see when my credentials are incorrect.  Make sure you double check the port and whether it is using ssl or not.  If you're absolutely sure they are correct then perhaps there is a firewall that is blocking the Blesta requests?

  2. A bug was introduced in 4.9.0 that causes the autodebit cron job to ignore the autodebit setting on an individual client in favor of the client group or company setting.  This only occurs when the client setting is false and one of the others is true.  This issue can be resolved by modifying app/models/invoices.php Invoices::getClientSettingSubquery() and replacing:

    
            $this->Record->select()
                ->from([
                    '((' . $sql1 . ') UNION (' . $sql2 . ') UNION (' . $sql3 . ') UNION (' . $sql4 . '))' => 'temp'
                ]);

    With

    
            $this->Record->select()
                ->from([
                    '((' . $sql1 . ') UNION (' . $sql2 . ') UNION (' . $sql3 . ') UNION (' . $sql4 . '))' => 'temp'
                ])
                ->group('temp.client_id');

     

  3. Must be running an old version, this was fixed back at the end of 2018.  You can add this just before the trouble line:

            if(!is_array($response->portfolios->name))
                $response->portfolios->name = [$response->portfolios->name];

     

  4. Well it requires some code tweaks or a custom plugin.  You can upload the files to the app/views/client/default/javascript or app/views/admin/default/javascript dir and then add a reference in the appropriate structure.pdt file.

  5. More clarity is needed.  Are you saying you want upload new custom css and js files?  "header footer file" are you referring to structure.pdt?  " then blesta ask for upgrade?" ... ummm, no? Blesta never asks you to upgrade, though when you update your Blesta version you do visit yourblestaurl.com/admin/upgrade.  Unless you are talking about upgrading a plugin.  In that case you would need to update the version in order to add new actions or event tie-in.

    Honestly I'm not sure what you're asking, but hopefully that was helpful X)

  6. Short answer: Use $this->partial('client_main_myinfo', $vars, APPDIR);

    Longer answer:

    The portion in the example code:

            // Override default view directory
            $this->view->view = "default";
            $this->structure->view = "default";

    That is what I'm speaking of.

    Unfortunately there isn't really any documentation on these classes other than the code itself.  $this->partial() is a method defined here https://github.com/phillipsdata/minphp-bridge/blob/master/src/Lib/Controller.php, or in the blesta code at vendors/minphp/bridge/src/Controller.php. That is also where $this->structure and $this->view are set.  Both of those properties instantiate the View class https://github.com/phillipsdata/minphp-bridge/blob/master/src/Lib/View.php or in the blesta code at vendors/minphp/bridge/src/View.php.

    The reason other plugins don't encounter this error is because they don't try to access view files from the app directory, only from their own view directory.

  7. The error seems to indicate that you called $this->partial('client_main_myinfo', ...).  So it is expected that it is looking for client_main_myinfo.pdt.  You are asking why it looks in the plugin dir instead of the default app dir?  Well likely your plugin has modified the view path in order to fetch your client_main.pdt file.  That being said, $this->partial() has a 3rd parameter for the directory to search in which you can you to override the view path. You might try using APPDIR for that parameter

  8. The other option here is to make a custom edit to your Blesta installation.  Something like ServiceChanges::getLineItems() that makes the line items, similar to the controller method AdminClients::makeLineItems()?

    This seems to be a total pain so I'm thinking about how we can make this work better for API user in the future.

  9. The display of order forms is controlled simply by their ID.  There isn't any great way to change this right now.  Here are the options, inconvenient as they are:

    1. Manually update the database to change the ID of the order_forms table and the associated records
    2. Recreate the order forms through the interface in the order you want them to be displayed
×
×
  • Create New...