• Resolved nipatel

    (@nipatel)


    I updated the plugin to 4.0.1 and getting this console error

    Font Awesome plugin is broken: initial state data missing.

Viewing 13 replies - 1 through 13 (of 13 total)
  • I have this same error and can add some information:

    I am running WordPress with composer and therefore I do not use /wp-content/plugins as the plugins folder. It looks like this is the problem as I get a browser console error saying there is a 404 for the css files because the site wants to load them from /wp-content/plugins/font-awesome which for my site, is not correct

    This happens from the Font Awesome settings page, for example.

    I can fix by changing all of the paths in font-awesome/admin/build/asset-manifest.json from “wp-content/plugins” to my plugins path.

    I guess the path in this manifest file cannot be hardcoded as lots of people run WordPress without using the standard “wp-content/plugins” folder path.

    Plugin Author mlwilkerson

    (@mlwilkerson)

    Thanks for the reports @nipatel and @lavignechris.

    And thanks also for that extra diagnostic detail, @lavignechris. Yes, I can see that’s a problem I need to fix. The JavaScript bundle resolves those paths at build time. They should be resolved at run time in order to allow for alternate directory structures like yours.

    Thread Starter nipatel

    (@nipatel)

    Thanks @mlwilkerson & @lavignechris

    Any idea of when a fix will be pushed?

    Plugin Author mlwilkerson

    (@mlwilkerson)

    I’ve begun implementing a fix, and I intent to release it within a week.

    Would you be able/willing to try a pre-release (install from a zip file), when available, to see if it resolves your problem?

    Thread Starter nipatel

    (@nipatel)

    Yea I’m willing to test it out!

    Thanks!

    @mlwilkerson I can test as well

    Plugin Author mlwilkerson

    (@mlwilkerson)

    OK, here’s a pre-release zip file, from our GitHub repo.

    But you’re installing via composer, then you should change your composer dependency to target the development branch, like this:

    
      "require": {
        "fortawesome/wordpress-fontawesome": "dev-fix-js-paths"
      }
    

    After digging into the details, I can see that it’s possible that the root cause of the error message as reported by @lavignechris is different from the one reported by @nipatel. I’d like to see how it works for both of you.

    I have the same issue with the same error which I believe started with the latest stable version upgrade. The release candidate you shared above solved my issue. Figured I’d let you know to give some feedback.

    Plugin Author mlwilkerson

    (@mlwilkerson)

    Thanks for the feedback, @ssteckley. Could you say whether you’re installing the plugin using Composer, or installing via the zip file?

    Can you say whether your situation involves loading the Font Awesome plugin’s assets from a non-typical location, such as within the Composer vendor bundle of some other theme or plugin?

    If you don’t know but would like to find out and let me know, read on. Otherwise, never mind the following:

    On a typical installation, like installing from the WordPress plugin directory, or by uploading the plugin’s zip file–and when there’s no other custom WordPress configuration that moves paths around–I’d expect the plugin’s main JavaScript to load from here:

    
    /wp-content/plugins/font-awesome/admin/build/index.js?ver=4.0.2-rc1
    

    (You could inspect this by opening the JavaScript console in the Chrome browser, select the Network tab, typing in a search filter for index.js, and then loading the plugin’s admin settings page. Here’s a screenshot that shows this.)

    Or if the plugin is loading through some other plugin’s or theme’s Composer bundle, it might look like this instead:

    
    /wp-content/plugins/plugin-sigma/vendor/fortawesome/wordpress-fontawesome/admin/build/index.js?ver=4.0.2-rc1
    

    Here’s a screenshot of that second scenario.

    (NOTE: the name of the JavaScript file would have been different in plugin version 4.0.1. If you, or others finding this, are curious to compare, here’s a screenshot showing what you’d be looking for in 4.0.1.)

    @mlwilkerson I have been able to test today.

    Added fortawesome/wordpress-fontawesome via composer. I moved it manually into WordPress plugins folder (I’m using the wpackagist service to fetch plugins normally).

    The dev version of the plugin that you provided works perfectly from my testing. No errors on the settings page. Inserting icons via shortcodes or via the inline editing tool works as expected.

    From my end, all looks good.

    Thread Starter nipatel

    (@nipatel)

    @mlwilkerson I was able to test as well and it’s working for me as well.

    Plugin Author mlwilkerson

    (@mlwilkerson)

    Version 4.0.2 has been released with those fixes.

    @mlwilkerson new version fixes the problem for me. thank you for your work

Viewing 13 replies - 1 through 13 (of 13 total)
  • The topic ‘FFont Awesome plugin is broken’ is closed to new replies.