Jump to content

adrian

PW-Moderators
  • Posts

    10,896
  • Joined

  • Last visited

  • Days Won

    348

Everything posted by adrian

  1. Agreed - I found that interface quite effective as well.
  2. I think I am scarred for life from my time battling that module. Thank you for taking this on - it will be a very welcome addition. A few initial thoughts: rlavin/php-rrule is very useful - I ended up using it to parse some info from the output of that module If you make use of momentjs, please ensure you use the version with timezone support - the lack of this was a huge part of the issues I was having and the module relied on an old version which made upgrading and switching to the timezone version quite difficult Please follow the rrule spec properly - the way it was implement did not follow the standard (I don't recall the exact problem, but a read through my comments should help you find it) so it resulted in errors when using php-rrule and other means of parsing it. Really focus on getting the API methods for querying events by date working properly and performantly - it was a nightmare in the other module. PS - I know I am coming across harshly regarding the old module. I don't want to sound unappreciative of the work that was put into it because recurring dates really are a difficult thing to do well and I have produced my own fair share of poor stuff and I am not saying I could have done any better. Best of luck with it and let me know if you have any other questions.
  3. @Robin S - not sure if this is something that can / should be corrected in this module, or if it needs to be handled the core findRaw, but I am seeing this error: Exception: SQLSTATE[42S02]: Base table or view not found: 1146 Table 'field_coupon_link' doesn't exist on line: 744 in /var/www/html/wire/core/PagesRaw.php when I do a call like this: $pages->findRaw('staff.count>0'); If I specify the fields I need like: $pages->findRaw('staff.count>0', 'staff'); it's fine because it prevents findRaw() from trying to find the table for RuntimeOnly fields. My instinct is that it will needed to be fixed in the core.
  4. Hi @Zahari M. - I spent a fair bit of time on this last night without any success. It's due to AdminActions adding the videos via the API which requires hooking into Pagefiles::install rather than InputfieldFile::fileAdded which is what the module uses when adding a video the normal way. I thought this would actually be fairly simple, but I couldn't get the hook to fire - not sure if I was just being dumb, or if there is something I need to do differently because this is a Fieldtype/Inputfield module - something I haven't actually done much with. I'll try to take another look, but honestly not sure when I'm afraid as I don't have much time at the moment. Sorry about that.
  5. Presumably that means that the copied item is broken if the original is deleted? Or is there a safeguard in there somewhere?
  6. Hi @Zahari M. - sorry about that. Unfortunately at the moment I don't have a server with ffmpeg to test this, but please try the attached version and let me know if that fixes things. FieldtypeVideo.zip
  7. Hi @Zahari M. - please grab the latest version of AdminActions - it should now support FieldtypeVideo for that action.
  8. I think perhaps PHP's error reporting just became more strict since I built this module and previously it let me be a bit sloppy in the code. hence that error when no subtitles were entered. Thanks for the kind words!
  9. Hi @Zahari M. - please try the latest commit and let me know if that fixes it for you.
  10. @ryan - lots of fantastic improvements - thank you very much! One thing I have started seeing (before this latest PW dev and RM versions, so not completely new), are errors like this: Please choose a different name for matrix type “icon_grid” as this name is already in use by a field. Please choose a different name for matrix type “buttons” as this name is already in use by a field. Please choose a different name for matrix type “reusable_block” as this name is already in use by a field. Please choose a different name for matrix type “selected_testimonials” as this name is already in use by a field. The weird thing is that I wasn't prevented from creating the fields (or the RM subfields), so the conflict checking isn't working until it's too late. The other thing is that it doesn't seem to actually break anything - is there actually a need to show these errors? What actually is the problem with having these duplicate field / RM subfield names?
  11. I wonder whether it would make more sense to reverse these so that it is enabled for all table fields, except the ones that have these checked? Another useful extension to this might be to exclude (or include) for all users, or just superusers. I know sometimes I still want to be able to import / export for a particular field, but I don't want other users to be able to do it for that field. What do you think?
  12. I was wondering about the need for that - glad that could also be removed. Everything looks good here now - thanks again!
  13. PS - those changes I suggested do break rendering if you call $page->qrcodefield in your template (or Tracy console), so it's not the correct solution.
  14. Unfortunately, this new version is still calling the new renderQRCode() method twice. I changed both the ___markupValue() and ___wakeupValue() methods to just return $value and everything seems good again. Keep in mind that I haven't tested the output in all scenarios, but it is working in the admin edit process. Probably a good place would be to check in a Lister view to make sure ___markupValue() is working correctly still. Actually, it looks like @Robin S's RuntimeOnly is calling its renderMarkup() twice so I think it needs some attention as well.
  15. Interesting. I was making use of the ___getQRText so I never an empty output - I expect that was why. Thanks for the updates, especially the access to the current page - much nicer than my hack to get it.
  16. I must admit I have wanted this at times also. I always assumed I would add a setting that determines whether the module is loaded at all for each table field. I never really considered controlling the access pr field via permissions. Do you actually need that level of control? If not, would you prefer to see a setting on each field's settings, or would you prefer a lists of allowed fields for import and export in this module's settings?
  17. Hi @monollonom - thanks for a very useful module. One thing I noticed is that render() is called twice. I think this is easily fixed by replacing: return $this->render(); with: return $value; in the sanitizeValue() method. You can also remove the other two lines from that method also because I don't think you plan is to modify anything in that method. Thanks!
  18. Looks nice @tcnet - would you consider a TracyDebugger dump() option? I think most PW users have it installed and it would save the need for the also installing the nice_r() library.
  19. IMPORTANT ALERT!!! Hi everyone, I had a site today that was loading really slowly for the first view for guest users. Turns out the https://restcountries.eu API that this module uses to determine if the user is in Europe is down at the moment, so loading of the site was waiting on a timeout from the failed call to the API. Now obviously the correct thing to do is for this part of the module (if enabled) to make this call asynchronously via AJAX so that it doesn't impact the loading of the site. The logic also needs to be updated so that the banner is also displayed if it can't find the visitor's region. At the moment it only works as a fallback if it can't get their IP address, which is obviously not very useful if the APIs are down.
  20. @jploch - it's definitely not out of scope for Migrator and it would be great to support it. There are a few places in the code where I have id!=2, has_parent!=2 - it's possible that removing those might take care of things. Can I leave it to you to test?
  21. Hi @Ivan Gretsky - I've had a couple of other requests for this so it's definitely on my list. I will try to get to it shortly.
  22. @Clarity - I think you'll need to write your own JS for that scenario. That said, I am a bit confused why you need the two separate fields. Any reason the user can't just select one or many languages from the ASM version? I am sure there is a good reason, I just can't see it :)
  23. @pwfans 1) You can parse out what you need like this: 2) Same as above really, although it will be a little less efficient. 3) It returns true / false if a page is prohibited for the current user.
  24. @jploch - I just tested a full zip export and import and it worked without any issues with the zip. I did just commit some PHP8 fixes, along with properly excluding RepeaterMatrix fields (I never added support for those), so grab the latest commit. That "zip.cpgz" is weird though - I wonder if there is an issue with Valet and the PHP zip library it includes? I wonder if you can convert that to a regular zip (https://www.lifewire.com/cpgz-file-2620362) and try importing that?
  25. @Ivan Gretsky - have you tried the Dumps Recorder panel? It is designed for these situations where the dump gets lost during redirects. Tracy handles some redirects, but not always - never really figured out why, but usually the Dumps Recorder takes care of things.
×
×
  • Create New...