cosmicsafari

Members
  • Content count

    47
  • Joined

  • Last visited

Community Reputation

6 Neutral

About cosmicsafari

  • Rank
    Jr. Member

Recent Profile Visitors

The recent visitors block is disabled and is not being shown to other users.

  1. cosmicsafari

    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.
  2. cosmicsafari

    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?
  3. cosmicsafari

    Thanks everybody, much appreciated.
  4. 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?
  5. cosmicsafari

    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?
  6. cosmicsafari

    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?
  7. cosmicsafari

    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.
  8. 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?
  9. 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.
  10. cosmicsafari

    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!' ]
  11. 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/
  12. 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.
  13. cosmicsafari

    Apologies I totally misunderstood your original post. Thats tremendous, fills exactly the purpose I need.
  14. cosmicsafari

    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