Roots Discourse

Acf blocks and admin webpack error

sage9
styles

#1

I am using ACF 5.8 beta to create custom blocks. I used this custom callback I found on medium. This was working well until my second block required a repeater field. I was reading through some discourse convos and they suggested updating soberwp/controller so I followed the instructions in the documentation. I’ve run a yarn build command and everything compiles fine. However, only on the admin pages where I have an ACF block, there are some missing styles and the admin looks like it’s trying to read the theme assets folder. I know when running yarn start you’re supposed to see a dist style error, but I see errors for every font manually installed, common.js and webpack config.

  • Ran this “$ composer require soberwp/controller:2.1.0”
  • Updated these
  • Adding block templates is working
  • Now I’m getting webpack and font errors on admin pages with ACF blocks.

#2

What are the errors?

Are you running a Browsersync session and using the WP admin? That is likely going to cause issues


#3

I am running Browsersync but I’ve never had this issue with it before. When in the admin I am using my “.test” and not accessing the admin with my localhost url. You can see my frontend fonts failing to load and there’s a simple script I need to run on the frontend only that you can see an uncaught error for. These normally load in frontend only and I’m not sure why these are in the console when I am in the backend admin of the site.

I should also add that when I screen shot these errors Browsersync was not running. I also do not have the issues if I switch themes.


#4

So I’m still not totally sure what caused this but it must have had something to do with the controller update and ACF 5.8 beta. My blocks where working fine but as soon as I updated controller all the errors started. I’m early enough in the build that I started over and did a fresh install of WordPress, the sage theme and ACF 5.8. I copied over my styles and assets and now the issues havent reappeared. This is probably an isolated incident but now I understand more about composer.