Jump to content

Error when upgrading processwire


Slav
 Share

Recommended Posts

Hey guys, so I am trying to upgrade my processwire from 3.0.42 to 3.0.62 and when I replace wire directory I get this error:

Fatal error: Exception: Field may not be named 'limit' because it is a reserved word

#0 /www/apache/domains/<mydomain>/wire/core/Field.php(227): ProcessWire\Field->setName('limit')
#1 /www/apache/domains/<mydomain>/wire/core/WireData.php(141): ProcessWire\Field->set('name', 'limit')
#2 /www/apache/domains/<mydomain>/wire/core/WireSaveableItems.php(178): ProcessWire\WireData->__set('name', 'limit')
#3 /www/apache/domains/<mydomain>/wire/core/Wire.php(383): ProcessWire\WireSaveableItems->___load(Object(ProcessWire\FieldsArray))
#4 /www/apache/domains/<mydomain>/wire/core/WireHooks.php(698): ProcessWire\Wire->_callMethod('___load', Array)
#5 /www/apache/domains/<mydomain>/wire/core/Wire.php(442): ProcessWire\WireHooks->runHooks(Object(ProcessWire\Fields), 'load

I don't understand where this name 'limit' comes from or what this error means! If I replace the wire directory back to the old one then no problem.

Can Anyone help? Maybe had similar problem with a reserved word...?

Cheers!
 

Link to comment
Share on other sites

7 hours ago, Slav said:

Fatal error: Exception: Field may not be named 'limit' because it is a reserved word

Hi,

There is a list of reserved words which cannot be used for a Field, see:

https://github.com/processwire/processwire/blob/master/wire/core/Fields.php#L36

I do not remember exactly when, but limit was added to this list, hence you cannot upgrade without first renaming the Field in question in the admin. You will probably need to change some code too, in order to accommodate to this change.

  • Like 4
Link to comment
Share on other sites

Thanks man! I really do have a field named "limit". Ok ill check all the fieldnames with the reserved names and then try again!

Cheers!

EDIT:

Ok so I renamed the field and the error disapeared! (Y)

  • Like 1
Link to comment
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
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...