Caddy 0.10.0 with Hugo 0.20.5 Admin Panel Error


I installed the newest version of Caddy and updated Hugo to 0.20.5.
When I login in the admin panel I can’t do something.
I got the error in the development console:

listing.js:153 Uncaught SyntaxError: Unexpected token return
?display=mosaic:8 Uncaught TypeError: listing.selectItem is not a function
at HTMLDivElement.onclick (?display=mosaic:8)
onclick @ ?display=mosaic:8

A JavaScript error of some kind. Looks like it’s trying to manipulate a list item when a user clicks on it. Is the Admin panel part of Hugo itself? I’m not familiar.

Hello @Tobias, could you give me the content of that file (listing.js)? Please. The thing is that on line 153 there is no token ‘return’ ( So I’m not really understanding what the error might be :confused:

On line 153 listing.js:

if(JSON.parse(data)==null){prompt.querySelector('p').innerHTML=`There aren't any folders in this directory.`return}

I updated Caddy and Hugo recently. Do I need the Filemanager Plugin that this works? I guess I just selected the Hugo plugin on the caddy download page…

@Tobias, are you using any kind of minifier or something?

Because your line 153 is my line 438 (check it out for yourself: ).

As far as I can see, your browser is putting everything in the same line :confused: Which is your browser?

P.S.: No, you don’t need to download the FM plugin. Although Hugo imports FM. And this JS issue is related to FM and not directly to Hugo :slight_smile:

Yes I use the minify plugin with caddy.

I use the admin panel with chrome. I can’t login with the firefox browser. It never takes my password. :slight_smile: