Jump to content

nahanil

Members
  • Posts

    21
  • Joined

  • Last visited

  • Days Won

    4

Everything posted by nahanil

  1. Go to "Packages" > "Package Groups" in the admin area (<yourdomain>/admin/packages/groups/) Click package group row you want to reorder Reorder the packages
  2. https://docs.blesta.com/display/user/Installing+Blesta#InstallingBlesta-3.ApplyHotfixFiles(ifnecessary) If you don't have the hotfix files from when you originally set up blesta you can find them again here https://account.blesta.com/client/plugin/download_manager/client_main/index/ Back stuff up first - not my fault if you break it
  3. What version of PHP & Blesta are you using?
  4. @SmallWeb Which version of PHP are you using when the issue occurs? This is a known issue with the XML parser in PHP 7.3.17 and 7.4.5 specifically and not neccessarily Blesta itself https://bugs.php.net/bug.php?id=79528 There is currently an open pull request for the namesilo module that fixes it https://github.com/blesta/module-namesilo/pull/9 and the next PHP releases should also fix the issue with the XML parser, but we will likely have to wait until early next week for the changes to be merged into the blesta module's master branch (cant work Jono too hard, he's probably already got too much on his plate) https://github.com/php/php-src/commit/cb265a0addf15c5cf0c029f167a9de030150cf15 https://github.com/php/php-src/commit/54148fd68677e8b13b5a11c309c601d1248fb78b
  5. On the main client page when clicking between the different statuses of invoices/services/transactions and then using the browsers back button, when the URL gets back to the original `/client/` URL a loading bar is displayed indefinitely. It looks like an AJAX request is triggered to load `/client/` instead of the initial tab of the widget which returns the full client homepage instead of whatever it should be loading. Nothing is logged to the JS console. This doesn't appear to happen on pages that only contain a single widget (ie, `/client/invoices`) Tested with v4.9.1 and in the wild. Can reproduce in Chromium 81.0.4044.129 / Firefox 76.0 / Chrome on Android 9 81.0.4044.138 ??‍♂️ Click one (or more) of the blue things. Click the back button as many times. Your call is very important to us. You have been placed in a queue. We will answer your call ... never ?
  6. The method call in question has `null` hard coded. Ouch <?php // ... public function getAllRenewingRecurring($client_group_id) // V L#2304... here we go boom $this->Record = $this->getRecurringInvoices(null, false)-> This was a "fresh" install and likely the first cron run. The task is still spinning at admin/settings/company/automation/ after ~1.25 hrs
  7. Support PIN Plugin Assign clients a support PIN to use when making contact. Features Configurable length PIN Client & admin widget Optional PIN expiration/rotation Validation API endpoint It's open sauce https://github.com/webmastery/blesta-support-pin/ https://marketplace.blesta.com/#/extensions/98-Support PIN
  8. Sorry to butt in here in an oldish thread, but I was curious about how this could as well - specifically for Australian domains (obviously not from NameSilo, but similar topic so didn't want to start a new one). The [com/net/org/id].au names are generally allowed to be transferred between registrars (or resellers) with no fee incurred, but the expiration date is not modified. Domains under .au are also only allowed to be registered for periods of 2 years, renewal only allowed within the final 90 days to expiration. A rather hefty fee is incurred for changing the registrant at any point in time, but that's out of scope here. I'm guessing Blesta wouldn't handle this kind of free transfer without expiration modification either ey?..
  9. @evolvewh Sucks their "v5" API call appears to remove some of the useful options Still good to know! Would be cool to see similar functionality implemented using other providers and plugins though as mentioned. I just liked the NameStudio implementation as it's free (and I don't currently plan on using any providers w/ LogicBoxes) & pretty flexible. I like that you can get geo-targeted suggestions & the API supports results in several languages (ie, can pass the Blesta users' current language to the API if it's supported and get "better" results). Not sure how you'd be likely to implement it @Blesta Addons, but this plugin I'm trying to get together should work regardless of the registrar plugin used/support all that are in use in your Blesta site.
  10. "Proper" events to target specific pages like would be amazing. My solution is basically a massive hack that inserts a little bit of code in the domain preconfig page. Unfortunately it runs on every page load and guesses in preAction if it's the right page to do the insertion, and then does some AJAX voodoo to pull in the data and build up the table. Wasn't sure how else to do it without modifying any core files. Also means that it will probably break if someone is using a modified order form/not the template pictured above ?
  11. That was the plan I guess. Still needs a bit of love and attention then I'll stick it up on GitHub for you guys to play with. Just some teasers for now ?
  12. Recently got an API key for VeriSign's Name Studio, and thought it'd be a decent opportunity to get my hands dirty with a Blesta integration. I've probably broken all kinds of rules and best-practices in implementing it, but not too far from a workable release. Early WIP, but there are a few screenshots below. Curious if anyone would find this useful. EDIT: FWIW if y'all apply for a name studio account now I should have something out by the time they approve your account. It's free, though does have some generous rate-limiting in place (in which case the plugin will just not show any suggestions at this stage). It's a janky process and took a few days - they called me a few days after applying and spelled the account's default password out character by character ? Another edit: Feel free to follow along at home/fork and make fantastic - https://github.com/nahanil/blesta-namestudio-plugin
  13. Referring to the method getSld() in <Blesta 4.2.2>/plugins/order/lib/order_types/domain/order_type_domain.php This method doesn't handle domain searches as gracefully as it could. Search: www.something.com (.com checkbox selected) something.com somethingwww..com Search: www.something (.com checkbox selected) www.com Search: something.com (.com checkbox selected) something.com Search: something (.com checkbox selected) something.com I'm not sure how this could be rectified by changing the existing regex, but I've found something like the following to handle all the above inputs to return something sensible function getSld($domain) { $parts = explode(".", $domain); if (count($parts) == 1) { return $parts[0]; } return $parts[0] == "www" ? $parts[1] : $parts[0]; } // Mentioned test cases foreach ([ 'www.something.com', 'www.something', 'something.com', 'something'] as $search) { echo "$search: ", getSld($search), "<br>"; } /* Output www.something.com: something www.something: something something.com: something something: something */
  14. Sorry to drag up an old thread, but is this the latest version of the Vultr module available @Paul, but I couldn't see this included in the full Blesta 4.2.2 package download. Just found an issue around line 905. I guess this is called in my test setup as I allowed clients to select the VPS template when ordering. public function getClientAddFields($package, $vars = null) { Loader::loadHelpers($this, ['Html']); // Get the available templates $templates = $this->getTemplates($module_row, $package); ... Adding the $this->getModuleRow(..) call seems to have fixed it up for now, but wasn't sure if this has already been fixed in a later release. public function getClientAddFields($package, $vars = null) { Loader::loadHelpers($this, ['Html']); $module_row = $this->getModuleRow((isset($package->module_row) ? $package->module_row : 0)); // Get the available templates $templates = $this->getTemplates($module_row, $package); Edit: Found a few other breaking issues, but not sure if it's worth noting them down if there is a newer release/it's somewhere on GitHub. Guess this goes back in the ideas pile. Another Edit: This wouldn't happen to be "up to date", and give me something to build upon if anyone knows? @cyandark https://github.com/CyanDarkInc/module-vultr/
  15. I just set up a fresh v4.2.0 install. The MySQL database password contains the character "$" which was stored in config/blesta.php as "\$". This made sense in older versions as the config options were surrounded by double quotes in v3.6.?, but it appears they've been changed to single quotes which led to me banging my head for a minute trying to figure out why I was only getting blank pages. <?php //... Configure::set('Blesta.database_info', [ //... 'pass' => '\$abc123', //... ] );
  16. After tinkering with a custom fraud-busting module I noticed the issue Jonathan pointed out as well. Guessing it never made it into 3.6.x and short of modifying the core/cart module it's not possible to work around it for now? Not a *huge* issue at this end as the initial plan is to only manage/bill existing clients accounts with Blesta, but moving forward into publicly offering services once more it's a fairly terrifying thought
  17. Hey all, Just wondering if there's a Right Way™ to access the systemEncrypt/systemDecrypt methods from within a module (specifically, a forked version of the Plesk service module). I've hacked it in for now, but it feels dirty and though it works I was wondering if there's a better way. Current 'solution': /** * Wrapper around systemEncrypt function * * @param string $string The string to encrypt * @return string The encrypted version of input string */ protected function encryptString($string) { if (!isset($this->Clients)) Loader::loadModels($this, array("Clients")); return $this->Clients->systemEncrypt($string); } /** * Wrapper around systemDecrypt function * * @param string $string The string to decrypt * @return string The decrypted version of input string */ protected function decryptString($string) { if (!isset($this->Clients)) Loader::loadModels($this, array("Clients")); return $this->Clients->systemDecrypt($string); } I don't actually use the Clients model anywhere, just load it so that I can have access to the systemEncrypt/systemDecrypt methods that are attached. I suppose the real question would be is it possible to add a bonafide custom Model to a module, as I'm storing the encrypted values in a table the module is creating for itself during install/upgrade. ie public function upgrade($current_version) { if (version_compare($this->getVersion(), $current_version, ">")) { // Upgrade to v1.0.2 if (version_compare($current_version, "0.2.3", "<")) { $this->Record-> setField("id", array('type' => "int",'size' => 10,'unsigned' => true,'auto_increment' => true))-> setField("client_id", array('type' => "int", 'size' => 10))-> setField("encrypted_field", array('type' => "varchar", 'size' => 255))-> ... setKey(array("id"), "primary")-> ... create("my_custom_table"); } } } $some_data = $this->Record->select()->from("my_custom_table") ->where("client_id", "=", $service->client_id) ->fetch(); $some_data->encrypted_field = $this->decryptString($some_data->encrypted_field); Not sure how I could wrap this up and have $this->MyModel->foo(), but I assume if it's possible it'd extend some base model class which would give me the encryption methods 'For Free'.
  18. Hey guys, I feel like a bit of a twit for not searching the forums for this stuff before forking and working on a fix for these same issues, but it looks like everyone's come to the same realisations. Password Strength For this issue I took the code in this gist and tweaked it a bit, overwriting the current generatePassword method in plesk.php with this. It can probably be greatly improved upon by someone less lazy than I as it's never going to pass the 'Very Strong' level of password strength set in Plesk. I took a look at Jsw.PasswordGenerator in Plesk Admin's jsw.min.js file and came up with this translation to PHP which seems to do the job. There's also a crude test loop at the bottom. IP/Hostname Debacle Also noticed this when I was playing with the "Log In" links generated for services. Then tweaked so it was called Hostname thinking all would be dandy before realising Plesk requires an IP address to create a service. So, undid my changes and added an extra "module_row" called host_name, and modified addModuleRow, getRowRules, getEmailTags, addService (maybe addService for another unneccessary reason) appropriately, added a new error message for the host_name field in the language file/modified the template file. The existing validateHostname method at a glance looks as though it should work fine for both IP addresses and domain-looking hostnames so I've used this for validating the field. These changes aren't too dissimilar to those in the gist @ctalkington linked to. I can try and tidy the file up and remove other unrelated changes if anyone would care to take a gander - I've hacked in a few other unrelated bits and pieces but after getting to know Blesta a bit better and putting some stuff into plugins I probably don't need them anyway. Moving Forward I'm about to put on my thinking hat in regards to CORE-1533 (Use shared login information for multiple accounts for the same client), but no idea how to approach this one yet - looks like it'd take a bit more work to get something working, especially if you have >1 Plesk server running (which is likely to be the case eventually. . I hope). This is a showstopper for me though before I can actually start using Blesta so it's up near the top of my todo list. Not sure if anyone's made progress on this front? (The fruits of my labor)
  19. Wow! UptimeRobot is pretty sexy. I've had a StatusCake account for a while but toying with the idea of either setting up cachet (since I found it in this thread), writing something that hooks into our internal Nagios stuff (which won't tell me anything about networking issues between the DC and the real world) but this also looks like a pretty sweet alternative StatusCake does the job & has a decent API. I think they have a few network farts here and there though because I'm pretty sure not all of the downtime they notify me about is actually the real deal (but yes I did break our fancy homepage this week for about half an hour - no client services were affected). http://uptime.webmastery.com.au/ linked for a real life comparison of UptimeRobot/Cachet & StatusCake history pages.
×
×
  • Create New...