processwire / processwire-issues

ProcessWire issue reports.
45 stars 2 forks source link

Compile Error: Cannot declare class InputfieldFileConfiguration, because the name is already in use (line 126 of site/modules/Inputfield/InputfieldFile/config.php) #1540

Closed nabo closed 2 years ago

nabo commented 2 years ago

Short description of the issue

I want to modify some lines of the InputfieldFile module. I could have modified directly in wire directory, but I prefer to copy the entire InputfieldFile directory inside site/modules/ and then modify it. It worked before 3.0.184.

Expected behavior

Thye expected behavior is no error :)

Actual behavior

This is the error I get when I try to edit a InputfieldFile field Compile Error: Cannot declare class InputfieldFileConfiguration, because the name is already in use (line 126 of site/modules/Inputfield/InputfieldFile/config.php)

As I mentioned before, I'm using PW 3.0.184

ryancramerdesign commented 2 years ago

Thanks @nabo I've pushed a fix for this

matjazpotocnik commented 2 years ago

@nabo Closing on the assumption this is fixed (thump up). Comment here again if that is not the case.

artfulrobot commented 1 year ago

I'm suddenly getting lots of these, for different classes.

Fatal error: Cannot declare class ProcessWire\InputfieldFieldsetOpen, because the name is already in use in /wire/modules/Fieldtype/FieldtypeFieldsetOpen.module on line 0

I'm on 3.0.210 which includes the fix above.

EDIT: Ah, probably unrelated, please ignore me. (I had it set up such that the httpd docroot was a symlink - for reasons of migrating from another CMS - and processwire did not like this on certain pages (Modules); changing the docroot to the actual path seems to have fixed it)