ryan Posted October 29, 2021 Share Posted October 29, 2021 Like last week, this week, updates continued on the core and matrix repeater fields. Repeater and matrix fields can now be configured to use fewer pages. When set, it won't create placeholder pages for repeater items until at least one repeater item exists for a given page and field. This can drastically reduce the number of pages consumed by repeaters in your system, and even more so if you are nesting repeaters. Eventually, this will become the default setting, but for now we are playing it safe and making it optional with a new toggle that you'll find on the Details tab when editing a repeater or matrix field: After enabling the "Use fewer pages..." Setting, the "Find an optionally delete unnecessary pages" checkbox will take care of cleaning up anything that isn't necessary for existing repeaters already in the database. If you have a large site with a lot of repeaters, this could be deleting a lot of now irrelevant stuff, so just be aware of that and backup ahead of time to be safe. Thanks to @Jonathan Lahijani for the idea/suggestion. Also new this week is the ability to copy and paste repeater items, as well as to clone above or below existing items. It handles this by replacing the existing "clone" icon action with a dialog that now lets you choose among various related actions. Among them is the ability to copy/paste from the same page or between different pages. The only requirement is that the repeater (or matrix) items are from the same field. See the video below for an example of how this works: This works with either Repeater or Repeater Matrix fields. But if you want this feature in Repeater Matrix, you'll want to upgrade to ProcessWire 3.0.188 and download the new version posted today (v8 beta) in the ProFields download thread. The ability to copy/paste repeater items was an idea originally from @David Karich and a module he developed called Repeater Matrix Item Duplicator. Thanks for reading and have a great weekend! 18 4 Link to comment Share on other sites More sharing options...
Ivan Gretsky Posted October 29, 2021 Share Posted October 29, 2021 Super cool! Just amazing) This is what we, the Repeater Matrix lovers are waiting))) Are those type icons already present in the new version, or are you saving them for now? 4 Link to comment Share on other sites More sharing options...
ryan Posted October 29, 2021 Author Share Posted October 29, 2021 @Ivan Gretsky Those are already present in Matrix as part of the header label. See the "Item Headers" input for each of the matrix types: 3 Link to comment Share on other sites More sharing options...
Ivan Gretsky Posted October 29, 2021 Share Posted October 29, 2021 I just re-read the previous post. It is what i did ask for not knowing we already have it) Could you please consider also allowing to put color code in that item headers string, so we can also define a per-type color? That would make different types really stand out) 4 1 Link to comment Share on other sites More sharing options...
ryan Posted October 29, 2021 Author Share Posted October 29, 2021 @Ivan Gretsky Sure, I can add that. 8 1 Link to comment Share on other sites More sharing options...
Ivan Gretsky Posted October 29, 2021 Share Posted October 29, 2021 Love this! If you stay up late enough on Friday night (it is almost midnight here), wonders will happen! 1 Link to comment Share on other sites More sharing options...
adrian Posted October 29, 2021 Share Posted October 29, 2021 @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? Link to comment Share on other sites More sharing options...
Jonathan Lahijani Posted October 30, 2021 Share Posted October 30, 2021 2 hours ago, adrian said: @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? @adrian That issue has been there for a couple years. I spoke about it with Ryan on a thread in the RM forum, but I can't find it. You can ignore those errors. I do however wish they would not appear since it feels like like a bug. 2 Link to comment Share on other sites More sharing options...
wbmnfktr Posted October 30, 2021 Share Posted October 30, 2021 Just pushed PW 3.0.188 and the RepeaterMatrix v8 beta to a side-project as it's a nice testing ground for this and it works perfectly fine. No errors or problems so far. The new icon option makes it super clean - if you want. Yet and empty entry with just an icon came up each and every time I updated the RepeaterMatrix field, even when I just opened it. 2 Link to comment Share on other sites More sharing options...
ryan Posted October 31, 2021 Author Share Posted October 31, 2021 @adrian @Jonathan Lahijani Consider those warnings to just be strong suggestions. If you want to ignore them, it's likely okay, but for most (including me) I would avoid colliding repeater matrix type names with field names because it's a source of confusion. I think I had also identified a case where it could a problem. I don't remember exactly what it was, but do remember it was possible enough to warrant displaying warnings about it, but unlikely enough to be okay to ignore if everything otherwise works. @wbmnfktr Turns out thats a leftover debugging/development message which is blank because the value it's showing is empty unless you use the images feature. It should only appear when editing the matrix field (Setup > Fields) and is okay to ignore. I'll make sure it's removed in the next update. Thanks. 5 Link to comment Share on other sites More sharing options...
Jonathan Lahijani Posted October 31, 2021 Share Posted October 31, 2021 On 10/29/2021 at 1:24 PM, ryan said: Also new this week is the ability to copy and paste repeater items, as well as to clone above or below existing items. It handles this by replacing the existing "clone" icon action with a dialog that now lets you choose among various related actions. Among them is the ability to copy/paste from the same page or between different pages. Hi @ryan. I was thinking, would it be possible to enhance this feature so that you could copy multiple repeater items to memory and paste them at once (and respect copied depth as well)? 2 Link to comment Share on other sites More sharing options...
BrendonKoz Posted November 1, 2021 Share Posted November 1, 2021 Out of curiosity, for file/image fields, are the copied values going to point to the originating pagefile URL, or is it creating a completely new physical copy of the source items on the page where the repeater is pasted? 1 Link to comment Share on other sites More sharing options...
wbmnfktr Posted November 2, 2021 Share Posted November 2, 2021 16 hours ago, BrendonKoz said: Out of curiosity, for file/image fields, are the copied values going to point to the originating pagefile URL, or is it creating a completely new physical copy of the source items on the page where the repeater is pasted? In my setup it's a reference to the already existing file on another page (the origin). Link to comment Share on other sites More sharing options...
adrian Posted November 2, 2021 Share Posted November 2, 2021 19 minutes ago, wbmnfktr said: In my setup it's a reference to the already existing file on another page (the origin). Presumably that means that the copied item is broken if the original is deleted? Or is there a safeguard in there somewhere? Link to comment Share on other sites More sharing options...
wbmnfktr Posted November 2, 2021 Share Posted November 2, 2021 Yes and no. In my first test I added an image from the global image field (in the template, not in the RepeaterMatrix) to a textarea. I copied that textarea over to another page and the image was referenced. I deleted the origin (master-repeater) and the image was removed on the second page as well. Not broken due to the clean-up process in my textareas. In my second test I created a new repeater type with an image field. Added one to a page. Copied it over to another on and the image was moved over to an all new repeater-page (first repeater had ID 8083, second had ID 8084). 2 Link to comment Share on other sites More sharing options...
Roych Posted August 4, 2022 Share Posted August 4, 2022 Hello, Not sure if I'm missing something, but the PASTE option stays there forever. Is it possible to clear this when pasted? It gets annoying to se it there when I pasted an item 3 weeks ago. ? Thank you R Link to comment Share on other sites More sharing options...
AndZyk Posted August 26, 2022 Share Posted August 26, 2022 @Roych You can clear the copy/paste memory in the select options, but yeah I think the memory could clear itself after for example loggin out. I think no one needs something forever in the memory. ? 3 Link to comment Share on other sites More sharing options...
Roych Posted September 2, 2022 Share Posted September 2, 2022 (edited) On 8/26/2022 at 11:15 AM, AndZyk said: @Roych You can clear the copy/paste memory in the select options, but yeah I think the memory could clear itself after for example loggin out. I think no one needs something forever in the memory. ? Hello, where is this option, I somehow can't find it? Thank you. ? Forget it I found it, thx ? Edited September 2, 2022 by Roych Found the solution ;) 2 Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now