Jump to content
gmclelland

Can't create a repeater field

Recommended Posts

I've tried multiple times, but when I try to create a repeater from the admin it gives the following error:

 Field: Can't save page 0: /processwire/access/roles/site-editor/for-field-158/: Pages using template 'role' are not moveable (template::noMove) [/processwire/access/roles/ => /processwire/access/roles/site-editor/]

58e7a2cba398a_EditFieldfeatured_itemmansfieldtexasarts.dev2017-04-0709-25-54.thumb.jpg.4831468415bd1b173c401423e3e94107.jpg

The field is saved, but doesn't allow me to add other fields to the repeater.

Any idea on how to fix this problem?

I have tried disabling modules, but still have the same problem.

ProcessWire: 3.0.58
PHP: 5.6.24
Apache: 2.4.23 (Unix) 
MySQL: 10.1.8-MariaDB-log

allow_url_fopen: 1
max_execution_time: 300 (changeable)
max_input_nesting_level: 64
max_input_time: 60
max_input_vars: 1000
memory_limit: 256M
post_max_size: 128M
upload_max_filesize: 128M
xdebug: 
xdebug.max_nesting_level: 

mod_rewrite: 1
mod_security: *confirmed off

GD: bundled (2.1.0 compatible)
GIF: 1
JPG: 1
PNG: 1

EXIF Support: 1
FreeType: 1
Imagick Extension: 

AdminOnSteroids: 1.4.1
EmailObfuscation: 1.1.0
FieldtypeAssistedURL: 1.0.0
FieldtypeLeafletMapMarker: 3.0.2
FormBuilder: 0.3.0
InputfieldAssistedURL: 1.0.1
InputfieldFormBuilderFile: 0.0.1
InputfieldLeafletMapMarker: 3.0.2
MarkupAddInlineScript: 3.0.2
MarkupLeafletMap: 3.0.2
MarkupSEO: 0.8.7
MarkupSimpleNavigation: 1.3.4
ModuleSettingsImportExport: 0.2.4
PageRenameOptions: 1.0.0
ProcessFormBuilder: 0.3.0
ProcessModuleToolkit: 0.2.3
ProcessWireUpgrade: 0.0.7
ProcessWireUpgradeCheck: 0.0.7
SchedulePages: 1.2.2
SiteTweaks: 0.0.1
TemplateEngineFactory: 1.1.1
TemplateEngineProcesswire: 1.0.1
TemplateEngineTwig: 1.0.4
TextformatterMakeLinks: 1.0.0
TextformatterOEmbed: 2.0.2
TracyDebugger: 4.3.1
TwigExtensions: 1.0.1
WireMailSmtp: 0.2.3
 

 

Share this post


Link to post
Share on other sites

I deleted the contents of my cache table in the db and then refreshed on the modules page.

Now when I go to create a new repeater, I get this message:

58e7ac20c2022_EditFieldfeatured_itemmansfieldtexasarts.dev2017-04-0710-08-45.thumb.jpg.4babb0f11dce13388aa586de9286c89d.jpg

Share this post


Link to post
Share on other sites

I also tried creating a repeater on a different site and importing it into my current site and this is the error I get:

test.thumb.jpg.ff42f1ad2090c131fb728efb084733fc.jpg

Share this post


Link to post
Share on other sites
1 hour ago, gmclelland said:

I also tried creating a repeater on a different site and importing it into my current site and this is the error I get:

Have you imported templates as well? Importing fields without referenced templates throws errors.

Share this post


Link to post
Share on other sites

The repeater field I created wasn't associated with an templates when I exported it.

Share this post


Link to post
Share on other sites

Another thing I noticed is that the repeater field that is created doesn't ever show the "Details" tab when editing the field.

Share this post


Link to post
Share on other sites

Hmm... I also tried disabling and uninstalling all third party modules, but still doesn't work.

Share this post


Link to post
Share on other sites

Seems related: 

 

2 hours ago, gmclelland said:

Hmm... I also tried disabling and uninstalling all third party modules, but still doesn't work.

OT: don't forget about Tracy's Module Disabler panel.

Share this post


Link to post
Share on other sites
6 hours ago, gmclelland said:

I also tried creating a repeater on a different site and importing it into my current site

I might be wrong but I don't think export/import of repeater items is fully supported (seems like repeaters should be excluded from the list of fields available for export to avoid confusion). Just like you can't duplicate a repeater field like you can with most other fields. If you check the export data for a repeater field you can see it is missing a lot of important information like subfields, and things like 'template_id' and 'parent_id' aren't going to be correct on the site you import to.

{
    "test_repeater": {
        "id": 145,
        "type": "FieldtypeRepeater",
        "flags": 0,
        "name": "test_repeater",
        "label": "Test repeater",
        "template_id": 55,
        "parent_id": 1079,
        "repeaterFields": "",
        "repeaterCollapse": 0,
        "repeaterLoading": 1,
        "collapsed": 0,
        "repeaterTitle": "#n: {title}",
        "repeaterAddLabel": "",
        "rememberOpen": "",
        "showIf": "",
        "columnWidth": 100,
        "required": "",
        "requiredIf": ""
    }
}

 

Share this post


Link to post
Share on other sites

Thanks @Robin S, good to know.  The main issue is that I can create a repeater field, but I can't add any additional fields to the repeater field.  It's missing the "Details" tab.

When I edit the newly created repeater field, it shows the following message "Field: You must assign a template to the page before setting custom field values (title)"

Any ideas as to what that could be?  I wonder how I screwed up repeater fields?  This is unfortunate because I was almost finished building the site when I had a need to use repeaters.

Share this post


Link to post
Share on other sites
22 minutes ago, gmclelland said:

The main issue is that I can create a repeater field, but I can't add any additional fields to the repeater field.

Do you mean a repeater field that you tried to import, or one that you are creating afresh via Setup > Fields > Add New?

When you create a repeater field it should create a (system) template for itself automatically so weird that you are getting that error. If you don't already have a lot of repeaters created I would try deleting all repeater fields, uninstalling FieldtypeRepeater, then reinstall FieldtypeRepeater and start over with your repeater fields.

Share this post


Link to post
Share on other sites

Yes, I mean one that I try to create via Setup > Fields > add new.  Not import.

So I uninstalled the FieldtypeRepeater module and reinstalling it gives me this message " Session: Module reported error during install (FieldtypeRepeater): SQLSTATE[23000]: Integrity constraint violation: 1062 Duplicate entry 'repeaters-2' for key 'name_parent_id'"

I guess I now have to find where there is a duplicate row somewhere in my database that is causing the problem?

Share this post


Link to post
Share on other sites

Ok, I got it.  I deleted all the "repeater" references from the database and then uninstalled and reinstalled FieldtypeRepeater module without an error messages.  I then was able to add a new repeater field with the option of adding additional fields to the repeater.

Thank you everyone for helping me out. 

Share this post


Link to post
Share on other sites

I had the exact same problem as gmclelland with creating a new repeater in PW 3.0.62 for a site that had migrated from 2.x. Unfortunately, temporarily purging all of my existing repeater fields and data from the database so that I could uninstall/reinstall the Repeater fieldtype did not resolve my issue. However, here's what worked for me:

  1. Create your repeater field using the normal method and save it to trigger the "You must assign a template to the page..." error.
  2. Note the ID number for your new field (mine was 170)
  3. Manually create a parent page for the repeater within the page tree (Admin > Repeaters > new) using the Admin template and the URL of for-field-170 (with the 170 being the ID from step 2) and publish it.
  4. Note the ID number for your new repeater parent page (mine was 1949)
  5. Using phpMyAdmin or equivalent, navigate to your Fields table and find the row for your new field (it's sorted by the same ID, so I looked for 170) and insert "parent_id":1949, (actual ID from step 4) directly after the template referenced in the Data column.

When I returned to the admin page for my field after this, the error message was gone, the details tab was present, and I could successfully add fields to my repeater.

  • Like 1

Share this post


Link to post
Share on other sites

I just ran into this problem again, this time when trying to create a new RepeaterMatrix field. 

The problem is after creating the field it shows the following message "Field: You must assign a template to the page before setting custom field values (title)" and it doesn't allow me to add any fields to it because there isn't any "Details" tab.

To fix it, I had to uninstall the Repeater modules(FieldtypeRepeater and InputfieldRepeater) and RepeaterMatrix modules(FieldtypeRepeaterMatrix and InputfieldRepeaterMatrix) then reinstall all the modules and then create a new RepeaterMatrix field.

Note: I'm running the latest version of ProcessWire 3.0.84.

Share this post


Link to post
Share on other sites
On 8/31/2018 at 2:14 PM, Andreas Faust said:

I ran into the same problem as gmclelland just now. 
I am using PW-Version 3.0.111 and RepeaterMatrix Version 4.

It would help if you could post this problem/issue in the VIP forum for Repeater Matrix (Profields Support)

https://processwire.com/talk/forum/43-repeater-matrix/

Share this post


Link to post
Share on other sites

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 account

Sign in

Already have an account? Sign in here.

Sign In Now

  • Recently Browsing   0 members

    No registered users viewing this page.

×
×
  • Create New...