Jump to content

sodesign

Members
  • Posts

    71
  • Joined

  • Last visited

Everything posted by sodesign

  1. I have one more question - do you plan to include child template fields? If not, what is your recommendation for querying child pages? Thanks
  2. One other small thing - can you add support for the built in 'title' field in the Page type? I tried this locally editing the getBuiltInFields() function at line 41 in src/Type/PageType.php Thanks, Tom
  3. Just updated and the issue is fixed, thank you for such a speedy patch!
  4. Sorry - copy and paste error*. I am using a ConfiguratorQuoteCreateInput field when I get the error. *(I tried using update as well in case the page reference needed a parent page to exist first)
  5. Hi @dadish, I'm upgrading a site to use the latest version of this module. I'm having trouble with a page reference field when creating a new page with a mutation. Before, I was using a mutation with variables like this: mutation ($page: ConfiguratorQuoteUpdateInput!) { createConfiguratorQuote(page: $page) { id } } variables: { "page": { "name": "test-quote", "title": "Tets Quote", "parent": "22905", "colour": [10392] // this is the page reference field } } I noticed the field now uses the type InputfieldPage rather than [ID] and there are add and remove fields inside this InputfieldPage field. I have tried formatting the variables in a couple of ways and I see this error in graphqil: // "debugMessage": "Method NullPage::add does not exist or is not callable in this context", // When using either of these variables: { "page": { "name": "test-quote", "title": "Test Quote", "parent": "22905", "colour": { "add": 10392 } } } variables: { "page": { "name": "test-quote", "title": "Test Quote", "parent": "22905", "colour": { "add": [10392] } } } Can you advise how I should be adding page reference fields? I have checked the page template and fields are legal, they return without issue in queries for existing pages. Many thanks, Tom
  6. This is great news! I love using the module, makes integrating Vue with processwire powerful. The only difficulty I had was with the N+1 with FieldtypePage, thrilled this is solved ? Thank you for all your work @dadish
  7. Hello, My ProDrafts license expired just shy of a year ago and I'm trying to find out if it's worth renewing. One of my clients has always been frustrated witrh the way images are handled - which I found mentioned here - effectively they 'get lost' and I have to do a weird dance of publishing, saving a draft, saving again, reuploading an image, saving a draft and then publishing, before unpublishign to remain as a draft etc etc... I am currently on version 0.0.6 - is anyone able to tell me if the issues mentioned in this thread have been resolved? Many thanks
  8. No problem, thanks for the clarification. In the end I solved this by saving the base64 image as a text field, and I'm planning to use an on page-created hook to convert this to an image in a more PW way. I look forward to seeing where this plugin goes; even in its early form it's been very helpful.
  9. Hello, Thanks for all your work on this module, it's a joy to use! I have a question around modifying a mutation, and am not sure how the ___getMutation Hook works. I normally use TracyDebugger but using Tracy with this module seems to break (all graphql responses throw a json error) How do I modify the value of a field in a mutation using the getMutation hook? Thanks, Tom Edit - to clarify - I'm generating a base64 image in vuejs on the front end, and need to save this to an image field. I'm planning to do this by sending the base64 string as part of the request (I'm using vue apollo) - and then intercepting this with a hook, creating and saving as a png file in a temporary directory, and then setting this as the PageImage url in the query.
  10. Just to follow up on this - I bought the Profiler Pro module and have been discussing this in the module forum there. As part of this I created a test template which just outputs a string, with init.php and main.php prepending disabled - the Profiler Pro time for this is down to under 300ms, while the load time I see in my dev tools is still between 900ms and 3000ms. My next steps are trying to find out why this discrepancy exists - very strange!
  11. Thanks for your reply - I've been making changes quite frequently - it's a fairly big site to which we're adding a shop. There's no one change which stands out as a huge change. Debug mode is off on the live site, other than when temporarily testing, and all of the modules are pretty much up to date. The load times aren't much better when in the admin which is why I haven't spent too much time trying to optimize templates - does template logic affect load time in the admin? I don't think Procache supports nginx. I was using fastcgi_cache but it gets a little messy with the way we're handling locale redirects - we need to refine our config. I'd rather find out the reason for the long load times before resorting to a flat cache. Do these timings for loading /pw/page look reasonable to you?
  12. Hello, One of our sites is suffering from very slow boot times, and I'm not sure how to diagnose the problem. Here's a grab of the debug panel in Tracy debugger after loading the homepage. A have a couple of questions - Are all of the times listed separate items, or are some of them a breakdown? I ask because the number shown in the tracy debug bar is the total of all of the items but the wording suggests boot.load.modules, boot.load.fields etc are a breakdown of the boot.load. How do I find out what these times consist of? Currently, when using the site, and when running page speed tools, the server load time is consistently upwards of 1s often above 1.5s. This is before the browser even starts downloading resources - a quick grab from my firefox dev tools was even worse: I would appreciate any advice on finding the cause here. A few details: Server is a digital ocean droplet (2GB memory + 2CPUs) running nginx and php7.0 - neither memory or cpu seem particularly taxed Site has 8 locales Using template cache and wirecache for heavy pieces of markup We're on the latest dev branch - the speed issue has been present for the last couple of versions. The speed is similar on when running locally (similar but stripped back nginx config) Thanks, Tom
  13. Hello, I'm having trouble adding fields to the pad_customer form. I have added two FieldsetPage fields each containing the default padloper address fields so that I can separate delivery address and billing address in the form. Currently in the orders page in the admin and on the checkout page, I get this error: Exception: You must set a 'page' (type Page) property to InputfieldRepeater with repeater field 'delivery_address' (in /Users/tom/Dev/So/bisley/back/wire/modules/Fieldtype/FieldtypeRepeater/InputfieldRepeater.module line 263) Can you advise what I can do to resolve this? Thanks!
  14. Just a quick follow-up to this - I have been importing more content in a tsv and ran across another issue. When the title of the page being matched contains a comma, the selector in the line above throws an error. $pageMatch = $this->wire('pages')->get("id=$options, title={$childFieldValue}"); An example page title is "Fixed Height, Loop Leg" - The error was from the Selector class, and the snippet included something to the effect of: "field: Fixed, value: Height " I think this was why I had used the selector value sanitizer method previously. I tried this: $pageMatch = $this->wire('pages')->get("id=$options, title={$this('sanitizer')->selectorValue($childFieldValue)}"); The import runs successfully, though I'm unsure if this might have knock-on effects elsewhere.
  15. Perfect, that's now working without error. Thank you for resolving this!
  16. When I run the import without the line, I get the error: 2298× PHP Notice: Undefined variable: title in .../modules/BatchChildEditor/BatchChildEditor.module:1676 The csv is 982 lines long, and 5 page reference fields are being imported, though quite a few of the values are empty. Is there any other information I can provide to help?
  17. Ah yes sorry - I'm on version 1.8.2. I can't remember which field was causing the issue - I thought it was the actual title, but I'm not certain. I'll try and get the error log later on today. Thanks, Tom
  18. Happy new year all That's great news about the multilanguage import. I'm blown away by how regularly great new features appear in both the core and in lots of modules! I had a quick question about regular non-multilingual csv imports - I was having trouble with an import whereby the existing titles weren't matching. I think it may be due to the titles having lots of punctuation (they're product codes which I have no control over). I am not familiar with the workings of this module, and was last-minute clutching at straws before the holidays - this seemed to resolve the errors I was seeing: Added after line 1674 in BatchChildEditor.module $title = $this->wire('sanitizer')->selectorValue($childFieldValue); I'm not sure of the cause or consequence of this, would it be helpful if I provide more details of the error message I see without this line? Thanks, Tom
  19. I guess the different case may have allowed it to sneak through - I can confirm I'm not seeing the issue now that I've renamed my function. I'll follow up if the issue remains resolved. Thanks for your help!
  20. Could it be to do with the fact I've named the function in my template sendMail? It only just occurred to me that it's the same as the function used by wireMail.
  21. Great, thank you for confirming. Is there anything I can do in the meantime to get around this? I'm on the 3.0.79 dev branch
  22. Thanks for the swift reply! Prior to trying to send a form, I see: Function SendMail($to, $subject, $body, $headers, $return_path) Then once I have tried to send a form, I see this: Function \ProcessWire\sendmail($to, $subject, $body, $headers, $return_path) The partial which handles the ajax request is like this: <?php namespace ProcessWire; use Valitron\Validator; function getInput($modules, $sanitizer, $input, $user) { ... $v = new Validator([ ... ]) ... $formFields = [...] return $formFields; // This contains the sanitized form fields content and the validation results } function sendMail($formFields, $modules, $pages, $sanitizer) { ... if ($v->validate()) { ... $mail = wireMail() ->to($contactFormRecipient) ->header('Reply-To', $email) ->subject(ucwords($mailer_subject)) ->bodyHTML($messageHTML); ... } } } $formFields = getInput($modules, $sanitizer, $input, $user); $output = sendMail($formFields, $modules, $pages, $sanitizer); if ($output['sent']) { echo json_encode(array(...)); } else { echo json_encode(array(...)); } Does the namespaced compiled function look right to you?
  23. Hi, I'm having an issue with the 'Test Settings' feature. Some background: I have a contact form which sends an email (triggered by ajax), which seems to work a couple of times, but then starts throwing 500 errors on send. At the same time, once the contact forms starts throwing 500 errors, clicking 'Test settings' in the module settings panel throws the same error: I'm not sure where to start finding the source of this issue - it seems that sometimes clearing compiled files solves the issue temporarily, but beyond this I'm not sure what to do. We're running the latest Dev branch, but swapping to Master didn't prevent the issue. Any advice on how to resolve this would be much appreciated! Thanks, Tom
×
×
  • Create New...