Jump to content

[SOLVED] "has the system flag" alerts


wbmnfktr
 Share

Recommended Posts

Today... after a short break over the holidays I started to work on a project again.

I created templates, fields, and various other stuff... but once in a while there was a short alert after saving/changing things.
I didn't pay much or any attention to it as it's common to see some alerts while changing, bending and breaking a system while setting up everything.

But now... these alerts start to pop up everywhere.

Tried to move the form-builder page in the page tree, tried to change a template, tried to install a module... in almost all cases of doing anything this alert shows up:

... has the system flag and you may not change its 'id' or 'name' fields.

Right now I'm running:

ProcessWire 3.0.147
PHP 7.4.1 (I know this is bleeding edge - but still).
OS: Linux (Manjaro)
DB: MariaDB
Profile: Multilanguage
www-user: $user

2020-01-05_19-48.thumb.png.4d26a463cea6e54791df2bb7c17779a6.png

I wanted to install the PW Upgrade module via Autocomplete Module Class Name and manually but I can't as it always ends in the shown (screenshot) result above.

Anyone an idea why this shows up (now)?
The PHP 7.4.1 is running here for quite some time now (or at least there was no update in the last 2 weeks) and other instances didn't show the alert at all.

Read/write permissions are fine. 
No hooks, no weird modules, user roles or anything by now are implemented.

Glicht? Hiccup? User-Machine-Disharmony?

Link to comment
Share on other sites

How could it be... it was silly me.

There was actually a hook in a module that caused this issue(s). Or to be precise: the function caused it.

Function that causes issues:

public function getTotalRating($event) {
  $page = $event->arguments[0];
  if($page->template->name = "mediaSeries") {
  	// logic here
  }
}

Function that doesn't cause issues:

public function getTotalRating($event) {
  $page = $event->arguments[0];
  if($page->template = "mediaSeries") {
  	// logic here
  }
}

Checking the template name wasn't a good idea.

 

 

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...