Jump to content

Leaderboard

Popular Content

Showing content with the highest reputation on 07/06/2017 in all areas

  1. Syleron, This is a bug within Blesta and more so with minPHP. Great find. The issue is within app/controllers/api.php in the preAction function. The function tries to load the model from the url: support_manager.support_manager_tickets. app/controllers/api.php // Ensure that the request is formatted correctly if (isset($this->get[0]) && isset($this->get[1])) { $this->model = Loader::toCamelCase($this->get[0]); It calls Loader:toCamelCase which returns SupportManager.supportManagerTickets What is expected is the following format: SupportManager.SupportManagerTickets On the surface this should not have caused an issue as if you called a function like get_declared_classes() it would show up as a class that was loaded. However, the problem is the case sensitive does manner when the api class calls method_exists and Router::isCallable. The minPHP function toCamelCase does not account for periods in its algorithm. /** * Convert a string to "CamelCase" from "file_case" * * @param string $str the string to convert * @return string the converted string */ public static function toCamelCase($str) { if (isset($str[0])) { $str[0] = strtoupper($str[0]); } return preg_replace_callback( '/_([a-z])/', function ($c) { return strtoupper($c[1]); }, $str ); } The Blesta team will have a permanent fix in place as there are many ways to solve this. For now, the below patch file will get things working on your end. Apply the following patch file with patch(1): --- app/controllers/api.php 2017-03-14 10:23:18.000000000 -0700 +++ app/controllers/api.php 2017-07-05 21:35:18.337455862 -0700 @@ -68,7 +68,7 @@ // Ensure that the request is formatted correctly if (isset($this->get[0]) && isset($this->get[1])) { - $this->model = Loader::toCamelCase($this->get[0]); + $this->model = str_replace('_', '', ucwords($this->get[0], '_.')); $this->model_name = Loader::toCamelCase( strpos($this->model, '.') !== false ? ltrim(strrchr($this->model, '.'), '.') -Adam
    2 points
  2. Paul

    WHMCS Importer Updated

    We updated the WHMCS importer today to resolve some issues for a customer migrating from WHMCS 7.1. The change should be in 4.1, but I'm adding it here on the forums in case anyone has trouble importing and wants to give it a spin. whmcs_migrator.php Download the file, and upload it to ~/plugins/import_manager/components/migrators/whmcs/ overwriting the whmcs_migrator.php file that is there. Run the import with System.debug and error reporting disabled in your ~/config/blesta.php config file, which is the default state.
    1 point
  3. We slow down a little bit the development of this module, because we are working on other projects, but the development still active.
    1 point
  4. I've alerted @Jono about this, hopefully he can make the change to the documentation.
    1 point
  5. 1 point
  6. if the nominet use the EPP server; we have a module already created and tested in some ccTLD registrar and is working . we need to check the Nominet API to be sure it use EPP server or not .
    1 point
  7. calling the models like this will not lead a problem i think $response = $this->api->get("SupportManager.SupportManagerTickets", "get", $data);
    1 point
  8. timnboys

    Nominet domain registration

    well it wouldn't be bad to make a domain registrar module for once(I don't think I have made one yet for public release for sale) since I have made a payment gateway and other modules but not a domain registrar module I will try to see what I can come up with.
    1 point
  9. Michael

    Nominet domain registration

    Correct theres: https://docs.blesta.com/display/dev/Modules & http://source-docs.blesta.com You can also download the files from blesta.com and open the following folder: /components/modules/ the domain registrars are: name cheap / logicboxes / enom and see how they call home etc. If not then you could contact a developer: @Blesta Addons @cyandark @PauloV @timnboys @ModulesGarden who can help you for a price. Otherwise you're welcome to open a feature request: https://requests.blesta.com/ Depends on the license query, we can help with most questions but some may need @Paul and the guys.
    1 point
  10. Working on a full solution for this. https://dev.blesta.com/browse/CORE-912 was meant to give customers the full amount of time they paid for, but I've confirmed that the changes made there are causing this issue. As a temporary solution for this you can comment out the changes made to the cron for this task on lines 2569-2575: 'date_renews' => ($service->period != 'onetime' ? date( 'c', strtotime(date('c') . " +" . $service->term . " " . $service->period) ) : null )
    1 point
×
×
  • Create New...