Jump to content

Jamie

Members
  • Posts

    10
  • Joined

  • Last visited

Everything posted by Jamie

  1. Ahhh, thank you!! That seems like it fixed it; knew it would be something simple like that! Really appreciate your help
  2. Yes, I uploaded everything to another repository. https://github.com/JamiesServers/TCAdmin This one worked for a good while but while testing (adding a service, removing suspending etc) it suddenly had the same problem mentioned above. I would really appreciate you having a look at it.
  3. I think you were right. I did a fresh installation of Blesta on my another machine and installed just my module and it seems to work. I think I might have changed something and then uploaded a version of my module which caused an incompatibility and when I uninstalled the module, some of the data must have not been removed from the database. I'll have to go through the database and see what is left behind in a little while. I'll get back to you if I find the issue. Thanks again. Edit: I spoke too soon. Went to edit a package and I get the same problem. And I'm back to square one again Edit 2: I have a look in the database when the module is uninstalled and there is nothing left over to do with the plugin; there is something definitely wrong with the meta but I have no idea what it is.
  4. Hello, Thank for your response. I have had a look in the database and everything seems to be fine. I essentially store the TCAdmin's servers information (Hostname, username and password). I get all this information on the manage module page which all displays fine. This was all working fine a couple of days ago. For whatever reason it just decided to stop working after not working on it. I did today remove everything which was not essential to see if it would fix itself but unfortunately, I had no luck. I have put on a 'minimal' version of my module which also has the same problem as I described above. https://github.com/JamiesServers/TCAdmin-Minimal I went through all of the documentation to see If i missed something but I couldn't figure it out. How to recreate my problem: Install the module Before adding a 'Server', create a new package and check if you can see the module's options (which you should be able to) Manage the module and add a server (there is no rules except isEmpty, any info will be used) Go back and try add another package, this time you won't be able to see the module's options. If you uninstall the module and re-install it, this problem will still persist. I hope this isn't down to a silly little mistake I might have made . I really appreciate your help. Jamie
  5. Hello, me again, I was continuing to creating my module today when I noticed that none of the fields I created in getPackageFields() was showing up when editing / creating a package. After several hours to attempting to see how the fields weren't displaying, I noticed that the fields were only displaying when I had no data stored for the Module. However, when I managed the module and added some data (Using addModuleRow()), the fields would disappear without any errors. I re-installed my Module several times to confirm this and it seems like that the fields will only display when there is no data stored. I re-write all of my 'admin side' (adding rows etc) and based it off the cPanel / Multicraft module as I thought I was doing something wrong. However, this didn't fix it. I am obviously doing something wrong but I cannot figure out what it is. I did some more debug and traced it back to 'admin_packages.php' in '/app/controllers/admin_packages.php'. /** * List module options for ajax requests */ public function moduleOptions() { if (!$this->isAjax() || !isset($this->post['module_id'])) return false; $this->uses(array("ModuleManager")); $this->components(array("Modules")); if (!isset($this->post['module_row'])) $this->post['module_row'] = 0; if (!isset($this->post['module_group'])) $this->post['module_group'] = ""; $module = $this->ModuleManager->initModule($this->post['module_id'], $this->company_id); if (!$module) return false; // Fetch all package fields this module requires $package_fields = $module->getPackageFields((object)$this->post); $fields = $package_fields->getFields(); $html = $package_fields->getHtml(); $tags = $module->getEmailTags(); // Fetch the parser options to determine the start and end characters for template variables $parser_options = Configure::get("Blesta.parser_options"); $module_email_tags = ""; if (!empty($tags)) { $i=0; foreach ($tags as $group => $group_tags) { foreach ($group_tags as $tag) { $module_email_tags .= ($i++ > 0 ? " " : "") . $parser_options['VARIABLE_START'] . $group . "." . $tag . $parser_options['VARIABLE_END']; } } } $groups = $this->ArrayHelper->numericToKey((array)$this->ModuleManager->getGroups($this->post['module_id']), 'id', 'name'); $rows = $this->ArrayHelper->numericToKey((array)$this->ModuleManager->getRows($this->post['module_id']), 'id', 'meta'); $row_key = $module->moduleRowMetaKey(); // ********** Here ********** foreach ($rows as $key => &$value) $value = $value->$row_key; $data = array( 'module_options'=>$this->partial('admin_packages_moduleoptions', array( 'fields'=>$fields, 'html'=>$html, 'group_name'=>$module->moduleGroupName(), 'groups'=>$groups, 'row_name'=>$module->moduleRowName(), 'rows'=>$rows, 'vars'=>(object)$this->post ) ), 'module_email_tags'=>$module_email_tags ); $this->outputAsJson($data); return false; } I used ob_start() to log all my var_dumps to a file, I could dump all the variables up to '// ********** Here **********' and past that point (when I stored data), I couldn't log anything else. (But it would work when i deleted the row). My apologies if I didn't explain clearly as I am not really sure what the problem is. I am attempting to create a TCAdmin module which I was planning on making public, I can put all of my (not so tidy) code on github if you need to have a better look. I appreciate your help, Jamie
  6. I am attempting to create a module for TCAdmin. TCAdmin uses the billing ID as a reference (It also uses the billing ID as the main ID to reference a service) and instead of creating a whole new lot of IDs that don't match Blesta's services IDs, I thought it would be more effective if the service ID matched the billing ID. I appreciate you comment and I'll have a little play around and see what I can come up with. Thanks alot
  7. Hello, I am in the process of creating a Module and I am in need of getting the newly created service's ID within the addService function. The ID I am after is the ending ID on this URL: admin/clients/editservice/2/5/ Obviously the `2` represents the client and the `5` represents the service's ID. Is it possible to get the `5` within the addService() function inside a Module? Or would I have to calculate it myself (As I am guessing that the service is created after addService())? Any advice would be really appreciated. Regards, Jamie Edit: Accidentally put 'addPackage()' instead of 'AddService()'; Ops!
  8. Ah! Uninstall and re-installing it done the trick. Not really sure why I didn't think of that. Thank you for your really quick reply!
  9. Hello, I'm in the process of creating my own plugin but I have unfortunately hit a stump. I am trying to render a new link under the "Account Actions" on clients profile page in the admin area. I have tried to use the examples shown here and I have also used examples from other plugins but I cant seem to get it to work. There isn't any errors, no blank pages, nothing. It just doesn't display the link (everything else in the plugin still works). Here is what I have at the moment: public function getActions() { return array( array( 'action' => "action_staff_client", 'uri' => "plugin/plugin_name/search/", 'name' => 'Test Action' ) ); } I have placed this after the install and uninstall functions inside my PluginNamePlugin file. I have had a search around and I cant seem to find the solution to my answer. Any help would be really appreciated - Jamie
  10. Hello, I was wondering if Blesta currently allows the 'free subdomain' option when signing up for a web hosting package (For example: an additional option under 'Configurable Options' when ordering a web hosting package which allows the user enter a subdomain which will be used instead of them purchasing a domain). I have looked around in the settings and couldn't really find any information about it. Thanks, Jamie
×
×
  • Create New...