ethanbeyer

Members
  • Content count

    63
  • Joined

  • Last visited

Community Reputation

37 Excellent

About ethanbeyer

  • Rank
    Full Member

Recent Profile Visitors

286 profile views
  1. Thanks for the help, @Robin S and @LostKobrakai! You guys rock.
  2. Oh my gosh - have I been reading these docs wrong all this time? http://processwire.com/api/ref/pagefiles/ hahahahaha I thought $page->files was an attribute that got set at some point and was a Pagefiles array of all files added to that page... Well that definitely solves one thing!! Thank you, @Robin S! I'm still very confused why some of the fields don't show up as a part of the $page->data array, though.
  3. @tpr I am not sure I know what you mean, but I changed the code within Tracy Debugger to $fg = $this->wire('fieldgroups')->get('document'); $t = $this->wire('templates')->get('document'); $example = $this->wire('pages')->get(1624); dump($fg, $t->fields, $example->fields, $example->files, $example->document_Files, $example->data); ...and all the dumps were the same as when the Page variable was named $page.
  4. This is a strange error I am totally unsure how to fix! It started when I was trying to get a file from $page->files. I know that there is a file in a field called document_Files. But $page->files returns null. So I popped into Tracy Debugger and wrote this code: $fg = $this->wire('fieldgroups')->get('document'); $t = $this->wire('templates')->get('document'); $page = $this->wire('pages')->get(1624); dump($fg, $t->fields, $page->fields, $page->files, $page->document_Files, $page->data); Resulting in 6 Dumps: $fg, $t->fields, $page->fields all result in the same object, which is to be expected. (fieldgroup): Fieldgroup {#173 +"count": 4 +"items": array:4 [ 1 => "title" 199 => "document_customizableCheckbox" 197 => "document_Files" 200 => "document_thumbnails" ] } But then it gets strange with $page->files null ...and $page->document_Files. Pagefile {#267 +"changes": array:1 [ 0 => "formatted" ] +data: array:6 [ "basename" => "example.pdf" "description" => "" "tags" => "" "formatted" => true "modified" => 1497976118 "created" => 1497976118 ] } I would expect those two to match. But obviously they don't. But then it gets weirder, still! $page->data should have four elements in the array - one for each field in the Fieldgroup - but two don't show up: array:2 [ "title" => "Introduction" "document_Files" => Pagefiles {#264 +"count": 1 +"items": array:1 [ "payroll_vault_brochure_markbeaton_2016_12_01p.pdf" => "payroll_vault_brochure_markbeaton_2016_12_01p.pdf" ] } ] Also, in the $page->data array, document_Files (the field) outputs as a Pagefiles class, whereas getting the field directly only returns a Pagefile. I don't even know where to start! Has anyone else had something like this happen? I have looked at the database starting with the template. I can confirm it has the correct fieldgroup_id, and that fieldgroup has all the correct fields. The page in question also is the correct template.
  5. I've built a couple PW sites now, and often I break my directories up like this: assets files cache logs sessions active.php index.php installed.php backups fonts js modules scss templates vendor But I kind of wish, in that schema, that I could change it to something like this: modules resources fonts js images scss storage backups cache files logs sessions active.php index.php installed.php templates vendor My reasoning is that JS/CSS/Theme Images/Fonts are site assets (or "resources"), while the caches/files/logs/sessions are more storage. And that is fine to set up manually - but in looking over the config.php file, I can't find a place where I can set that so that ProcessWire will respect it. Every part of this CMS is flexible, so I do assume there is a way to do this - I just don't know what it is. Has anyone else done something like this?
  6. If it's shared hosting and all of the sites on your IP are potentially sending emails, that is almost certainly your problem. Again, I'd look into an email delivery service like Sendgrid, Mandrill or even TurboSMTP - these will help with deliverability, and you won't be competing with other sites on the same IP to get emails out.
  7. Check this out: http://docs.mailpoet.com/article/49-lists-of-hosts-and-their-sending-limits For OVH: Most likely because of bounces, your site is unable to send emails. A couple of things you can do: 1. Contact OVH and ask them to give you some idea of what your email's standing is. 2. Use a service like Sendgrid (sendgrid.com) as an off-site SMTP delivery service. If I remember correctly, Sendgrid is free up to 12,000 emails a day. Hope this helps!
  8. Often times when things like this happen it's because you've gone over your limit for emails to send through a particular SMTP host. Who are you trying to send through?
  9. I know this is a pretty old thread, but every time it comes to creating a Repeater through the API, I get LOST. @thetuningspoon's function illuminates a LOT of what happens behind the scenes when a new Repeater is made through the GUI - but I just wishing it was as simple as: $f = new FieldtypeRepeater(); $f->set('name', 'repeaterTest'); $f->add($repeaterField1); $f->add($repeaterField2); $f->save(); Because that isn't technically possible without setting the Fieldgroup or Template that will be used by the Repeater first, right? At the end of the day, I think we should improve the docs for Repeaters (https://processwire.com/api/fieldtypes/repeaters/) to include a section on creating a Repeater from scratch through the API so that this process is more easily understood. I am always referencing several Forum posts and parts of the docs in order to get through the spaghetti - having everything in one place would be great. Otherwise it would be awesome to have some functions as a part of the FieldtypeRepeater Class that cut down on the amount of API calls one needs to make in order to create one of these. Just my 2 cents.
  10. I will happily help you with this - it seems like your modules totally pwn the one I wrote. I'd love to try it out!
  11. module

    God bless you, I was going to write something that did this - you did it better than I would've! Also - will you be adding this to the Module library?
  12. module

    I like the look of this!!
  13. @Alxndre' it definitely can. I can add a get() function that would return the entire output from last.fm into a WireData object, and then people could use that however they please. The render() function is written for me specifically, so it probably makes sense to give it a lot more flexibility than it currently has.
  14. @Robin S thanks for the feedback! I will make that change. @maxf5 I see what you're saying completely - but I am also endeavoring to keep my sites from disintegrating into the norm of wordpress sites - being made up of gazillions of similar, undocumented functions. At least with a module they're easy to find... I also plan to add more functionality to the module in the long run. I like your one-line solution, but as much as anything else, it was an educational experience for me, that's all!
  15. Thank you both, @LostKobrakai and @abdus ! Hugely revealing - and a good refresher on some Magic Methods! <3