• Content count

  • Joined

  • Last visited

  • Days Won


Tom. last won the day on June 12

Tom. had the most liked content!

Community Reputation

346 Excellent

About Tom.

Profile Information

  • Gender
  • Location
  • Interests

Recent Profile Visitors

2,297 profile views
  1. Added step by step guide: 1. Create a new template called bug. 2. Create two repeaters one called repeater_1 and repeater_2. 3. Create a text field called text and add that to repeater_1 and repeater_2. 4. Add repeater_1 and repeater_2 to the bug template. 5. Add this code to ready.php: $wire->addHookBefore("Pages::save", function($event) { $page = $event->arguments("page"); if($page->template == "bug") { for($i = 0; $i < 3; $i++) { $p = $page->repeater_2->getNew(); $p->text = "Bug"; $p->save(); } } }); 6. Create a bug template page and add content to repeater_1. 7. Click save, you will see that the content for repeater_2 isn't saved, however 3 repeater_2's are added. 8. Remove $p->save(); from the provided code. 9. Add content to repeater_1, you will see that content is added however only 1 repeater is added to repeater_2. $p->save() causes any other repeater to not save, I believe this also applies to Page Reference (see:
  2. You replied to it. For Github - I have elaborated on the steps to reproduce as suggested. I did however, include a video and example code in the bug report. I also in bold, isolated the exact issue.
  3. Thanks for the great update @ryan, any chance you could have a look at github? This bug is preventing me hitting a deadline. I'm worried I may have to swap to dare I say, WordPress until it's fixed. Its for an eCommerce system I'm building for a client which I will be releasing Open Source once completed. This guy seems to be having the same issue - just in a different context. Basically using save() in the hook Pages::save causes repeaters or page references not to save. Edit: Do you have a paid service in which you can pay to push bugs to the top of the list when it's deadline critical?
  4. I guess what you are asking is how do we get more casual developers interested into ProcessWire? As in you said, you don't want to learn how to connect these frameworks up to ProcessWire. I don't think ProcessWire currently fits in a market where everything is module or theme. While it has the features to be. It just doesn't have the audience. I would say nearly everyone here is a developer that writes bespoke websites for their clients. I think trying to compete with WordPress in its versatility to just pick up, install a theme and a couple of modules and off you go. Could damage ProcessWire. For example a lot of WordPress websites get hacked due to the fact that modules/plugins installed aren't secure. I personally like where ProcessWire sits, it's really easy to pick up and learn, the API is by far the best of any other CMS available. However it takes the patience to learn. However not everything is handed to you. Go out and learn how to hook these frameworks into ProcessWire. I promise you, you won't regret it. And then why not release it as a profile? That's how the community and library gets bigger.
  5. I'm not sure of the likely hood for a default site profile including these. Minify CSS/JS is included in AIOM and ProCache - I don't think this will make it's way to the core. There is a UIKit Site Profile which is using - Am I miss understanding your question?
  6. Yeah, I'm starting to think this is something to do with mod_security or timeout. The script seems good? That or it's a bug with ProcessWire. It has the appearance of a mod_security issue blocking the fields from saving. But I don't know. Usually when that happens if effects all fields. Edit: Checked, mod security is turned off
  7. Thanks for the suggestion, but sadly not the case. Here is a quote from Ryan: "It shouldn't be necessary to do the $page->repeater->add($repeater); as the getNew() method already does that."
  8. Tried setting both $page->of(false); and $new_option->of(false); problem still exists.
  9. Edit: Added step by step Hey guys, I'm building an eCommerce for ProcessWire which is coming along nicely. However I've come across a bug which I can't seem to figure out what's going off and why. I've put up a post on GitHub, but I know Ryan is a busy man and I am currently working on this 6-8 hours a day. Here is a link to the issue.
  10. I'm hoping to release it in alpha early next year. It will come as a site profile which has a starter theme and everything.
  11. @ryan, Hi Ryan, I've come across quite a major bug, but I can't seem to tell you exactly why it's happening. Maybe I can send you a copy of the files and explain to you? I'm building an Open Source eCommerce system for ProcessWire and I've come across something very weird.
  12. @ryan I can't seem to find any way to sort repeaters in the backend. Do you have any news on this? I tried going to where you said however nothing about sorting shows up in Family.
  13. Yeah, slightly strange argument. My argument is if UIKit is the right way to go all together. I'm going to say something crazy, but I think it should be built with little to no dependencies. I feel like these bugs are appearing due to all these dependencies and different systems trying to work together jQuery UI, UIKit both have JS that do the same thing. Some things are using jQuery UI some things are using UIKit. Often there are strange bugs with repeater AJAX like fields having a slightly different design when loaded through AJAX. Like the Page Reference field using AMS for example. Personally, I see the ultimate admin panel is from the ground up, following a guideline with every single tiny element considered. Like how should things collapse when next to another element. But so far I'm loving the UIKit version, it's looking great. Just I think a future goal should be it's own system.
  14. No idea why my original code it wasn't working, I've given it another go and it's working now. $wire->addHookAfter("Pages::saveReady", function($event) { $page = $event->arguments(0); if($page->template == "repeater_variations") { $title = array(); $check = array(); $i++; foreach($page->variation as $variation) { $parent = $variation->parent->title; if(in_array($parent, $check)) { $this->error("Variation #$i had a duplicate ". strtolower($parent) .", the duplicate has been removed."); $page->variation->remove($variation); } else { array_push($check, $parent); array_push($title, "$parent — $variation->title"); } } $page->title = implode(", ", $title) . $parent_title; } }); Thanks for you help. EDIT: Silly me, it was because I wasn't making changes to the repeater when testing, there for it wasn't firing saveReady.
  15. Strange, I can't get the first one working. I would assume it did work since when saving a page, repeaters also save to a page. To explain what's happening, I'm building an eCommerce system and front-end that I'm going to release open source for ProcessWire. It's in it's early stage and I'm mostly mapping the UX. The variations are variations of a product, this is a repeater on the product page. The variation you can see that I set as an array are titles from a PageReference field, that lets you select things like colour and sizes for that variation. The hook is to change the title field in the repeater to those titles, the repeater uses this title field for the name of the repeater item. For example "#1: Color - Red, Size - M" the title is a hidden field, used purely to show what product variation that repeater is. It does other things like check if there is two colors selected, and deleted one informing the user that it shouldn't have two from the same group. Sadly I still haven't figured out to do it without defining $repeater->save() inside the repeater foreach on page save. Which seems really inefficient.