Upload Field Name Issue

3 posts by 2 authors in: Forums > CMS Builder
Last Post: 9 hours ago   (RSS)

Not long ago I updated to the latest version of CMS Builder.  It wasn't until today that I needed to upload a file in an upload field.  When click the Add or Upload Files Link I get a lot of errors.  See the attached screenshot.  It does allow me to upload a file and I can access it via the web page normally.  If I try to delete an upload, I get the error in the second screenshot.

Seems to be an issue with the column name.  These sections were made in a previous version and worked fine.  Is this an issue with the latest version or DB that I need to change on my end?

CMCB Version 3.81 Build 2999

PHP 8.3.28

Thanks

Phil Colvin

Hi Phil, 

Sorry about that, thanks for letting us know.  

Can you edit /cmsb/lib/ZenDB/Assert.php and search for validColumnName

Then replace that entire function with this: 

public static function validColumnName(string $identifier): void {
    if (!preg_match('/^[\w-]+$/', $identifier)) {
        throw new InvalidArgumentException("Invalid column name '$identifier', allowed characters: a-z, A-Z, 0-9, _, -");
    }
}
We'll update this for the next release as well.

Thanks!
Dave Edis - Senior Developer
interactivetools.com