nurkka Posted March 27, 2024 Share Posted March 27, 2024 Hi @kongondo, today I tried to upgrade a ProcessWire website from PW 3.0.210 to 3.0.229. After that, when trying to access pages in the backend, which contain MediaManager fields, the following error occured: ProcessWire\WireException Item 'type' set to ProcessWire\Pagefiles is not an allowed type search File: /html/website/wire/core/WireArray.php:458 448: * 449: * @param int|string $key Key of item to set. 450: * @param int|string|array|object|Wire $value Item value to set. 451: * @throws WireException If given an item not compatible with this WireArray. 452: * @return $this 453: * 454: */ 455: public function set($key, $value) { 456: 457: if(!$this->isValidItem($value)) { 458: throw new WireException("Item '$key' set to " . get_class($this) . " is not an allowed type"); 459: } 460: if(!$this->isValidKey($key)) { 461: throw new WireException("Key '$key' is not an allowed key for " . get_class($this)); 462: } To verify that this error was caused by Media Manager, I renamed the directory "MediaManager" in the modules folder. Then, the error disappeared. I had to downgrade ProcessWire for now, but the website has to be updated sooner or later, as other modules and parts of the site depend on it. Do you have any hints what I can do to avoid this error or is there a bugfix release of MediaManager? Link to comment Share on other sites More sharing options...
nurkka Posted November 21, 2024 Author Share Posted November 21, 2024 Hi @kongondo , the described error still persists, and we can't update the ProcessWire version. Do you have any hints what I can do to avoid this error or is there a bugfix release of MediaManager? 1 Link to comment Share on other sites More sharing options...
kongondo Posted November 22, 2024 Share Posted November 22, 2024 Hi @nurkka, Sorry about this. Could I please get backend access to the site to debug there? Great if it is a dev/staging site. Thanks. Link to comment Share on other sites More sharing options...
nurkka Posted November 27, 2024 Author Share Posted November 27, 2024 Thanks @kongondo ! I'll send you the login data in a PM. Link to comment Share on other sites More sharing options...
xportde Posted yesterday at 09:07 AM Share Posted yesterday at 09:07 AM Hi @kongondo, we have the same problem as described by @nurkka, but it only occurs from ProcessWire 3.0.236 onwards. 3.0.229 works fine, but current master 3.0.244 gives the same error, when accessing a page with media manager field. It looks like there were changes in the core WireArray class to which the mediamanager would have to be adapted. That's a pity, because our clients are using heavily MediaManager, but so we can't deliver the current ProcessWire master with the (long awaited) new page versioning feature. Do you have any news about this problem? Link to comment Share on other sites More sharing options...
kongondo Posted 14 hours ago Share Posted 14 hours ago (edited) Hi @xportde, Sorry about the issue you are facing. In @nurkkacase, we found out that the issue was the use of FieldsetPage with MM fields (of non-image type) and using that FieldsetPage inside a Repeater. In such a case, the name given to the MM field inside the FieldsetPage would cause an issue if the FieldsetPage had a similar name. E.g. An mm field named mm_something inside a FieldsetPage named fieldset_page_mm_something inside a repeater field would cause the error. No error if the FieldsetPage is outside a repeater. Renaming either, e.g. mm_something_else or fieldset_page_mm_another would get rid of the error. This was tested with latest stable version of ProcessWire. I run the test on @nurkka's website. I am waiting for @nurkkato confirm that this works fully before releasing. Would this be your issue as well? If not, if I got login details to your site, preferably a staging or development site, I could debug. Thanks. Edited 13 hours ago by kongondo Add info Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now