Jump to content
CliffG

Error message "Invalid value sent to Page::setTemplate" when trying to add or delete repeaters

Recommended Posts

Hi,

I know that similar postings have been made, but the discussions and the code therein were way over my head.

Here's my problem:

I created a website on my local machine that used repeater fields. Everything worked. I transferred it to the dev server online using the Export Site Profile module. Everything worked there, too. Here my memory is a little murky, but I believe that I added some fields to templates that caused pages with repeaters to generate about 1000 new invisible, system-level pages each time they were edited. (This may be what renobird discussed here: <http://processwire.com/talk/topic/3619-updating-repeaters-via-api-without-removeall/>)

So I fired up phpMyAdmin and manually deleted all those pages -- and probably some that I needed for the repeaters. I cleared the cache. I turned the Repeater inputfield off and on. But now I can neither delete the existing repeater fields in the admin nor create new ones. I tried importing a sql dump of a repeater field from the original system but that didn't solve the problem either.

Can anyone tell me if there's a way to fix this? I really need to use repeater fields for this website.

I've built a few sites with PW and feel quite comfortable with it but I haven't plumbed the depths of the API yet and have only the most rudimentary PHP skills. Even so, it's amazing how much I can get done. But, as you see, it's still possible to get stuck when you go beyond your depth.

Your patience is much appreciated.

Cliff

Share this post


Link to post
Share on other sites

Are you getting errors when trying to delete or add new repeater fields, or is just nothing happening? Sorry - you show the error in the subject :)

I really haven't used repeater fields much at all, but if you are having problems deleting existing fields, you can do that through PMA as well.

I wouldn't recommend deleting anything through PMA generally, but since you have already ventured in there and deleted all those pages, it sounds like that might have broken some things already anyway.

Go into the "fields" table and delete the appropriate lines as well as deleting the "field_fieldname" tables.

Or if you are cautious, wait for a more authoritative answer :)

  • Like 2

Share this post


Link to post
Share on other sites

Adrian,

I'm getting errors when I try to delete existing repeater fields or add new ones.

I wouldn't recommend deleting anything through PMA generally, but since you have already ventured in there and deleted all those pages, it sounds like that might have broken some things already anyway.

I'm pretty sure this is what happened.

Go into the "fields" table and delete the appropriate lines as well as deleting the "field_fieldname" tables.

Or if you are cautious, wait for a more authoritative answer

I'll take a look but given the damage I already did, I may way for more answers. Thank you very much for yours!

Cliff

Share this post


Link to post
Share on other sites

Adrian,

I went back to PMA as you advised and deleted all the tables of fieldtype Repeater -- and it solved the problem!

Many, many thanks!

Cliff

  • Like 1

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.


  • Recently Browsing   0 members

    No registered users viewing this page.

  • Similar Content

    • By verdeandrea
      Hi guys,
      I'm getting crazy trying to figure out what is the cause behind a weird problem is giving me some bad moments with my client.
      I have a repeater field, with some fields as childre. From one day to the other the children fields of the repeater change and i find other fields as children. Also, all the content my client inserted in that repeaters are gone, cause now we have the new empty children fields. I really don't understand what can be the reasons behind this.
      This happened more than once.
      It' s like there is a repeating action that changes the repeater's children. The only repeating action I can think of is the chronjob for the database. Could this depend on that? Have you any idea or suggestion of what should i check or ho to solve this weird problem?
      Thank you very much!
    • By benbyf
      Hi,
      Been updating fields on a live site from my dev site to get them in synch and I noticed repeater pages visible in my pagetree on teh live site. What might I have done to have this happen? The repeater module was enabled on both sites.

    • By quickjeff
      Hi Guys, 
      I have been using Processwire for years now and have mastered enough to create some amazing sites and applications. 
      However, recently I have been thrown a bit of a curveball and hoping some more veteran members can chime in. 
      I recently ran into a weird issue. I had imported about 100+ wordpress pages into a new Processwire site using namespaces. 
      I imported them under a parent page called /landing-pages/.
      However, I needed to move 20+ of these imported pages to a new parent page called /customers/.
      Since I was moving so many, I figured batcher was a solid module to run this task.
      Here are the steps I took:
      Located all the pages I needed using batcher Changed the pages templates Located the pages again after changing their template Made the pages hidden and then located them again using batcher Changed parent page from /landing-pages/ to /customers/ The issue that occurred is that not only did I change the parent page for these pages but apparently the pages also existed under /admin/repeaters/for-field-whatever which now changed to the new parent of /customers/.  
      for-page-1625 admin /admin/repeaters/for-field-108/ So I reverted this by using batcher again, here are the steps I took:
      Located all the pages that were not supposed to be moved  Changed the pages parent back to /admin/repeaters/ The issue is, after this was done, every time I clicked the new page under /customers/whatever-page I would get a 404. 
      To correct this I had to delete all the pages under /admin/repeaters/ and /admin/repeaters/for-field-whatever and then go back and delete the pages under /Customers/ and create them all from scratch. 
       My questions are: 
      Why did Processwire create pages under /admin/repeaters  for the imported pages? The steps I took to correct this issue, is this okay to keep building the site or am I better off starting fresh again?  
    • By Sipho
      I am trying to create a sort of database system using ProcessWire. I don't want all the data to show up as pages on the website but instead pull it into pages. Similar to the Skyscrapers demo except in that one the data shows up as pages. The data I wish to store is information about types of moths. So family, sub-family, genus and species. Each of these has information associated with it. For example, species has name, images and distribution. This is another example of information about the species. Initially, I attempted to do this using nested repeaters. This appears to work but I feel there is a better and more elegant way. Additionally, this page says: 
      So I then tried using pages with children, but this also didn't work well. I had to make every single page unpublished as I don't want them showing up in menus and other places. This means they all have strikethroughs in the admin tree which is very annoying.
      Is there a better way of handling this kind of data in ProcessWire or is this maybe not a suitable project for ProcessWire? I apologise if this is a silly question, but I could not find anything on this matter and am still new to ProcessWire.
    • By CarloC
      Hi everyone,
      I've upgraded one of my pw 2.7 websites to the 2.8 legacy version and I'm encountering some problems.
      As you can see in the image I don't see uploaded images thumbnails anymore, and the repeater fields previously added are no more usable.

      Why I'm having this strange behaviour simply after an upgrade from processwire 2.7 to 2.8?
      Hope you can help me, I'd like to use the 2.8 version features like the front-end inline editing, but it seems like I'll be locked in the 2.7 version forever
      Thank you!
       
×
×
  • Create New...