ryancramerdesign / ProcessWire

Our repository has moved to https://github.com/processwire – please head there for the latest version.
https://processwire.com
Other
727 stars 201 forks source link

3.0.5: repeater parent created even if no repeater content is added #1636

Open cb2004 opened 8 years ago

cb2004 commented 8 years ago

If I have a repeater assigned to a template, every time I go into a page (with debug=true):

Created Repeater Page Parent: /ntadmin/repeaters/for-field-116/for-page-1049/

This is without adding any repeaters to that page. Unnecessary addition to the db?

LostKobrakai commented 8 years ago

That's how repeaters work, they prepare pages for later usage. Not to say I fully understand the reason and it's causing confusion every now and then, but it's always been that way.

cb2004 commented 8 years ago

I only noticed it with debug mode on so never knew this. All good if that is the way it is supposed to be, but with the new Ajax functionality I was wondering if it could only add the parent page when needed. Sure there are many other factors though, so I was just curious.

ryancramerdesign commented 8 years ago

This is the intended behavior, but it may be possible for us to avoid the automatic parent. I've put a @todo in the file to take a closer look at this during the next repeater update.