Jump to content

cosmicsafari

Members
  • Posts

    80
  • Joined

  • Last visited

Everything posted by cosmicsafari

  1. Thanks for the replies folks. Given the above response does the following hypothetical setup sound reasonable. Primary DB with mirrors hosted on Azure Rsync contents of Assets/Files folder between primary server and mirrors Enable database driven sessions, that way we don't need to copy Assets/Sessions between the servers Obviously thats very vague in the details but as a general proposal is there anything glaring wrong with this approach?
  2. Hi all, I have been asked by a client whether we can setup load balancing for their existing Processwire site. From my investigations on Google and within these forums, it definitely seems possible but as a newbie with a basic understanding of the subject im a bit lost. Does anyone know of any existing tutorials for settings up load balancing with PW? What items would need to be changed on their current stand alone install, is there a list of best practices worth consulting etc? As I understand it we would need to have some sort of copying mechanism (rsync script most likely) in order to make sure any uploaded assets are shared between the main server and the fallback ones, other than that im not sure what else would need to be ammended. Any thoughts/help would be greatly appreciated.
  3. Good to know im not going mad and its supposed to work that way. Both seem like good solutions, will try both and see which works best for my project. Many thanks! ?
  4. Hi all, This is more of a general question than a problem per say. Anyway I have been using the AssistedURL module for call to action links among other things, on the whole its a great module so shout out to the developers. That said I just noticed that if you update a linked PW page's name/url any link field on other pages using AssistedURL don't update automatically. If this is a limitation then thats fine just thought I would ask incase there is a setting either at module or sitewide level that I am missing that enables this to happen.
  5. Not an explanation as to what caused the issue, however this workaround got me back up an running. I deleted the language page record from pages table of the DB, this allowed me to create a new language while still keeping the same name. I then receated the the language from within the backend and readded in the alternative language content to the fields in the effected pages. So to summarise I have it working again but still have no idea what caused the intial problem
  6. Hi all, Thought I had the language translation working but now when I attempt to access the language through the backend (Setup > Languages > My Language) it throws an error: Recoverable Fatal Error: Argument 3 passed to ProcessWire\LanguageTranslator::textdomainTemplate() must be of the type array, null given Can anybody shed any light on what would cause this error when trying to access my language through the settings in the backend, or attempting to view it on the frontend with its language specific URL. The only thing I have changed recently was moving the DB to a different location however the one exported was the one that I previoulsy had my custom language working on it previoulsy. Any ideas, im at a bit of a lose as to what would have caused this when it was working previously.
  7. Thanks for the replies, its much appreciated. From reading your responses I think I have a handle on it now. Will report back once I no doubt prove that above statement wrong though ?
  8. Hi all, This is my first foray into a multi lingual PW site, what i'm unsre about is whether the frontend output is translated automatically or do I have to provide the content in another language also? As it stands I have installed the following modules: And have created and uploaded the Chinese language pack. At this point I can successfully change my profile and the backend successfully displays in Chinese. However I am confused about how I now get that translation to work on the frontend? I have setup the alternative url for the page I wish to view in Chinese So as a basic test I tried adding the following into the template used for the page above. However both urls still display the message in English? I take it I have missed something, do I then need to enter the frontend output in Chinese in another field within the backend to enable Chinese url to output the content? Any ideas would be greatly appreciated.
  9. Hi all, I see that @wumbo mentioned that the 'Link Attributes' where specifically removed from the modal which pops up. However is it possible to enable the 'Link Attributes' tab for this field type, seems like it would be very useful for my current project.
  10. Hi all, Just a quick question, when using the multisite module is there anything different that needs to be done in order to setup HTTPS for each of the domains its serving? Would a single SSL certificate for the main domain be enough to cover the others aswell or would you need multiple ceritficates one for each domain the mutlisite setup uses?
  11. Hi all, I am working on a site which involves a lot of image upload fields, 99% of the time it works perfectly but I have noticed that every so often image variations will be missing. Like the original uploaded image is fine but maybe 1 or 2 out of the variations is just blank. The variation files will appear within the assets folder but they will be just in name only without any actual image content. Since its quite a random thing I am finding it rather difficult to figure out why this happens? Any ideas?
  12. The site has a regular flow of visitors so I don't suspect it is that, the timing out issue could be possible right enough. What would be the best way to un-jam it if thats the issue? Uninstall/Reinstall LazyCron?
  13. Hi all, I have noticed that LazyCorn seems to run maybe once or twice and then just stops. Has anybody else encountered this, I have the following within 2 different modules. public function init(){ $this->addHookAfter('ProcessModule::executeEdit', $this, 'configurableButtons'); wire()->addHook('LazyCron::every15Minutes', $this, 'autoGenerate'); } public function init(){ wire('forms')->addHookAfter('ProcessModule::executeEdit', $this, 'configurableButtons'); wire()->addHook('LazyCron::everyHour', $this, 'getExport'); } Does having multiple LazyCrons setup cause any issues?
  14. Thanks for the reply but I think I have sussed it, not sure why it was never an issue up to this point right enough. I updated my code from above to try: $this->log(1); try { $p->save(); } catch (\Exception $e) { $this->log($e); } $this->log(2); Which gave me an error mentioning using $p->setOutputFormatting(); So I updated to $this->log(1); try { $p->setOutputFormatting(false); $p->save(); } catch (\Exception $e) { $this->log($e); } $this->log(2); Which appears to have fixed the issue.
  15. Hi all, Im a bit confused by an issue I have come across today. I have a module which connects to a third party (once an hour using LazyCron), parses a publicly available XML file, turns it into useable information which I then use the API to save as PW Pages. On the whole this has been working great however today I noticed that it kept failing on one of the imports. After doing some investigation I realised its appears to be dying at the save page stage. From the documentation $page-save() should return either True/False, so I thought I would update the code to reflect this while debugging. $this->log(1); $bool = $p->save(); if($bool){ $this->log('Saved successfully'); } else { $this->log('Fail to save'); } $this->log(2); However the script only gets to the save() part and then appears to terminate. Then when checking the error log the latest entry is always just '1' Any ideas as i'm a tad confused why I at least don't get a response of some kind?
  16. Huzzah! Managed to figure it out. For anybody else with this issue, there is a setting for the Page Selection fieldtype to allow UnPublished page at the bottom of the Details tab.
  17. Hi all, From my attempts it seems like this is not possible but thought I would raise it here before scrapping the idea and trying something else. I have an importer script reading a third party feed and creating some pages (page_type_A) based on that. It also creates some other pages (page_type_B) which are by default set to unpublished as the third party don't seem to have control over some of the data they send us, so we set them to unpublished so that someone on our end needs to approve them, so far so good. The issue I have encountered is that page_type_A at creation uses the API to set one of its fields to a particular page_type_B, the field is setup as PageSelector. When I look at the database this seems to work fine, but if you go into page_type_A the Page Selector list is always preset to blank? I updated the Page Selector and set the Selector String to use "include=all" which does populate the drop down with all the correct pages but since there all unpublished it never seems to be preselected to the one which is actually saved as in the DB. Hope that makes some sort of sense.
  18. That sounds promising however do you have an example, I tried adding it to my module config page but get: InputfieldWrapper: Skipped field 'test' because module 'InputfieldMarkupInputfield' does not exist Scratch that got it to work with : [ 'name' => 'test', 'type' => 'Markup', 'value' => 'Huzzah!' ]
  19. Hi all, Just wondering if its possible to just add some basic output to my modules config page. I was wanting to output a bulleted list of some information which I will be pulling from a third party. Retrieving the data is fine i'm just not sure how to output it to the config page? From what I can see in the link below, it only seems like you can append form items to the page. https://processwire.com/blog/posts/new-module-configuration-options/
  20. Hi all, I am using the formSubmitSuccess form builder hook to send a copy of the form submission to a third party. However I couldn't figure out how to get the submissions form type at this point, the reason being is that I only want to send the data onto the third party for certain form types. I don't have the submission details being passed into the hook, wasn't sure how to achieve this so at the moment I have it doing a DB query to pull the latest submission details for that form type so I'm rather stumped about how I can go about achieving this. Hope thats makes sense.
  21. Apologies I totally misunderstood your original post. Thats tremendous, fills exactly the purpose I need.
  22. Changed to use ProcessModule::executeEdit, and it fires the method. However as you would imagine it fires it on the page load when you try to view the page with the button on it which isn't ideal. If there was a way to pass the value of the button to the hooked method I could just use a conditional but again im not sure if thats possible
  23. Hi all, Not sure if this is even possible but I would like to add a button on my modules configuration page that triggers a method to run. The method in question belongs to the module itself. Is this possible? So far I have: MyModule.module public function init(){ wire('forms')->addHookAfter('InputfieldSubmit:processInput', $this, 'foo'); } public function foo(){ error_log('IT WORKS!!'); return; } MyModuleConfig.php public function __construct() { $this->add( [ [ 'name' => 'Foo Button', 'type' => 'InputfieldSubmit', 'value' => 'Fire Foo Method', ] ] ); } This renders the button but so far haven't had any luck getting the method to fire successfully. I haven't found any examples from my investigations so apologies if this is an impossible request.
  24. Hi all, A few of our clients are having issues receiving emails sent via form builder after a client submits a form. They display fine in certain clients but in Outlook especially the body content is either missing or the raw code is displayed. Does anybody have any ideas why this might be the case or any ideas about how to diagnose the issue? Not sure if this is an issue with the emails themselves or the server from which they are being sent. Just wondering if anyone else has experienced anything similar?
×
×
  • Create New...