Jump to content

adrian

PW-Moderators
  • Posts

    11,191
  • Joined

  • Last visited

  • Days Won

    373

Everything posted by adrian

  1. @jon9china - sorry you're having problems with the module. You could please clarify what you mean by "the user restricted branch setting" ? Are you talking about the "User Specified Branch Parent" option for the "How to match user to branch" setting? Do you have the same problem if you use one of the option ways to match the branch? I can't replicate the problem here, so I am wondering if you might have some other additional hooks (custom or in a 3rd party module) that are also controlling access. It sounds like you are running out of memory due to an infinite loop. If you can narrow it down to some other code interaction that will help. If it's not that, would you mind trying to debug this module to see where it might be goin awry? Could you also post your other settings for the module? Also, is the error only when viewing the admin with a restricted user?
  2. Thanks @teppo - hooking into Renderer::renderResult worked great! Gotta say, this is a really well thought out, and well coded module. Cheers!
  3. Hi again @teppo - I am looking to include an image for each result. The key thing is that I want to show a thumbnail version so I want to be able to call PW's size() method on the image object, rather than simply using {item.images.first.url} I think there are probably a few different ways to accomplish this - maybe by doing a str/preg_replace on the rendered results, or maybe hooking into one of the render() methods within your module, or perhaps doing a completely custom rendering of results, although I am currently not sure how to show the _auto_desc when doing a custom render. Is there a trick for this? Otherwise, I wonder if this is something you think might be a good feature to include so it's easier to do this via the standard renderResults() method? Thanks for your thoughts / ideas.
  4. HI @Matthieu - I've just added support for the MapMarker field type. Please update and let me know if you find any problems.
  5. Hi @teppo - I've noticed a few issues with apostrophes when searching. The first issue is perhaps not something to can easily fix if you rely on PW selectors to do the search, but it is a shame that omitting an apostrophe from the search term results in no matches. The second is more fixable - notice how the results don't include the _auto_desc when you enter a search term with an apostrophe. The second screenshot shows the same returned results, but this time I searched for the phrase without the word with the apostrophe and the _auto_desc is included as expected. The final thing I noticed is that when the search term has an apostrophe, input->get->q ends up being empty. I was using it to populate the search input field so the user gets the results page with the search populated with the phrase they just searched for. Thanks.
  6. Hi @shadowkyogre - looks like you would need that logic, but you'd also need to add the TFA field to the login form. Unfortunately I don't have time to look into this at the moment, but if you can get it working and provide a PR, I'd be grateful.
  7. Not sure if something changed at some point, but I thought the column used to expand automatically when opening elements, but for now you can still make the entire panel wider with the drag handle at the bottom right which seems to do enough.
  8. Issue with screencast posted: https://github.com/processwire/processwire-issues/issues/1335
  9. Of course - that works perfectly, thank you!
  10. @Robin S - I am trying to offer selection of an uploaded file and not sure if I am taking the most efficient approach, but either way, it's not quite working. I am using https://processwire.com/modules/fieldtype-select-file/ to give me a InputfieldSelectFile $wire->addHookAfter('HannaCodeDialog::buildForm', function(HookEvent $event) { // The Hanna tag that is being opened in the dialog $tag_name = $event->arguments(0); // Other arguments if you need them /* @var Page $edited_page */ $edited_page = $event->arguments(1); // The page open in Page Edit $current_attributes = $event->arguments(2); // The current attribute values $default_attributes = $event->arguments(3); // The default attribute values // The form rendered in the dialog /* @var InputfieldForm $form */ $form = $event->return; if($tag_name === 'audio') { $modules = $event->wire('modules'); /* @var InputfieldSelect $f */ $f = $modules->InputfieldSelectFile; $f->name = 'selected_file'; $f->id = 'selected_file'; $f->label = 'Select File'; $f->folderPath = 'assets/files/'.$edited_page->id.'/'; $form->add($f); } }); All looks good so far, but then I end up with: Any ideas what I might be doing wrong, or if there is a better way? FYI, I had to change the root path in that File Select module to start at /site/ instead of /site/templates/ Thanks for any thoughts!
  11. @ryan - what do you think about having a referencesRaw() page method. If you're outputting a long list of pages referenced to another page, often all you need are the title and url field values. As an example, I am outputting a list of publications for a staff member. I believe this would really speed things up. Thanks for considering.
  12. Hi everyone, I had a client notice something weird and I can reproduce it as well. Using Safari (on a Mac - not sure about Windows), create content in a CkEditor field with an image before any other content. When inserting you must check the "caption" checkbox so that PW will wrap it in a <figure> tag. Now add some text below the image. Now, select that image and click the Image button the CkEditor toolbar (or right click on it and select image properties). You can make a change if you want, but even clicking "Insert Image" without changes will work. Do that, and you'll see that all content below the image is gone. If you add a sentence before the image, you'll see that the problem no longer exists. I'm not sure yet if this is a PW bug, or a CkEditor bug. Thanks for any help in confirming this and any thoughts of what is to blame ?
  13. Or another approach if you don't want to actually change the name: https://processwire.com/modules/process-redirect-ids/
  14. Hi @bbeer - sounds like you have duplicate entries for sqlite3.so in your php.ini file.
  15. @Arcturus - I think you should be using the dev branch - I believe that the 2.0 branch is obsolete. @teppo ?
  16. Sorry about that - amazing no-one has come across that before - I think it's because you loaded the Dumps Recorder before ever using the Console panel, but doesn't really matter, it should be fixed in the latest version.
  17. Make sure you limit it to the PageEditor interface in the admin - you don't want that checkbox appended everywhere back and frontend ?
  18. @szabesz - maybe it's because I have my trackpad sensitivity / speed quite slow, but I struggle to actually reproduce what you see. Perhaps I could remove the Tracy core eventListener for moving the bar. I disabled moving it another way quite a long time ago - it was causing all sorts of other problems IMO and didn't add any significant benefits.
  19. Hi @MarkE Sorry I've been so long to respond - way too busy here at the moment. I don't have a fully working solution for you (I couldn't quite get there as quickly as I need to), but here are some starting points. The first one is hacky. The second is where you want to end up, but you'll probably want to do a $f->addClass('hidden') or something like that. I also didn't want to use a Markup inputfield but it seemed like there were issues with overriding the main "override" field. Also, using $p->override isn't actually working because it's preventing you from changing the value that is already in the system but if you set it to 0 or 1, you'll see that the approach has merit in that it will change the visibility of your other field. Sorry it's not fully working, but hopefully gets you there. Remember the key thing is that showIf conditions work via JS, so the values need to be available that way, not just via $page->override like you were trying. $this->addHookAfter('Page::render', function(HookEvent $event) { $p = $event->object; $event->return = str_replace("</body>", '<input type="hidden" id="Inputfield_override" name="override" value="'.$p->override.'"></body>', $event->return); }); $this->addHookAfter("ProcessPageEdit::buildForm", function(HookEvent $event) { $p = $event->object->getPage(); bd($p->override); $form = $event->return; $f = $this->modules->get("InputfieldMarkup"); $f->attr('id+name', 'override'); $f->attr('value', '<input type="hidden" id="Inputfield_override" name="override" value="'.$p->override.'">'); //$f->collapsed = Inputfield::collapsedHidden; $form->insertAfter($f, $form->title); $event->return = $form; });
  20. Thanks for your thoughts @FireWire - I think I'll be having to switch to Lingvanex sooner than later, so there might be a PR coming you way. Let me know if you already have any thoughts on how you would like to implement different translation engines so that I hopefully do it in a way that you're happy with.
  21. Sorry @Macrura - I ended up going a different way, so I already deleted the field. Super busy at the moment, but if I find some time, I'll try to reproduce. I don't think I did anything special though.
  22. Thanks @Robin S - sounds great!
  23. @Robin S - just discovered that if you have this attached to a field that is editable under a user's profile page, it breaks the field with a JS error because it can't load this component. No rush for a fix for my needs, but someone else might come across it.
  24. Just resize via an API call within the <img> tag, eg: <img src="<?=$page->image->size(400, 0)->url?>" /> That will resize, store it (not visible in the admin) and display it on the frontend where called and will be available to all future calls without going through the actual resize each time.
  25. @FireWire - sorry for the silence on your last post - I haven't had a chance to test this new version yet - hopefully soon. A question for you thought - have you looked at: https://lingvanex.com/translationapi/ - they are much cheaper than DeepL and support a LOT more languages. This post is also worth a read: https://lingvanex.com/history-lingvanex/ Anyway, I am need of Tagalog translation and am thinking about Lingvanex but would like to know if you investigated it and decided against it for some reason. Thanks for your input.
×
×
  • Create New...