Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bundled extension displaying numerous error messages in system log for missing assets #7077

Closed
tompato opened this issue Oct 13, 2017 · 0 comments
Assignees
Labels
bug A bug that has been verified
Milestone

Comments

@tompato
Copy link

tompato commented Oct 13, 2017

After converting to a bundled extension from a local extension, the system log is displaying numerous error messages for missing assets - in this case a CSS file. The CSS file is loaded correctly and everything works as it should, it only includes the file on the back-end as specified (setZone) and in the correct position at the bottom of the template (setLate).

Details

  • Bolt Version:3.3.6
  • Install type: Composer install
  • PHP version: 7.0
  • Web server: Apache/2.4.18

Reproduction

Bug summary

So there's a bundled extension that is used on the back-end of the website and it includes a single CSS file to style up this back-end page. This is registered using the following function:

  protected function registerAssets()
  {
    $asset = new Stylesheet();
    $asset->setFileName('extensions/local/tompato/contentreview/contentreview.css')->setLate(true)->setZone(Zone::BACKEND);
    return [ $asset, ];
  }

This adds the asset to the bottom of the template on the back-end and correctly links up and the included CSS is parsed.

<link rel="stylesheet" href="/extensions/local/tompato/contentreview/contentreview.css?f3f43731e4" media="screen">

However, when looking through the system log, I get the following error message every few seconds (possibly overtime the front-end or back-end of the website is hit but I can't confirm that)

Couldn't add file asset 'extensions/local/tompato/contentreview/contentreview.css': File does not exist in either web://Tompato/ContentReview or theme://extensions/local/tompato/contentreview/contentreview.css directories. Make sure the file exists in either of these locations, by placing the file there manually (for Bundled Extensions) or by uninstalling / installing the extension again (for Managed Extensions).

Now, the file is definitely in public/extensions/local/tompato/contentreview/contentreview.css and the attached screenshot will show that.

screen shot 2017-10-13 at 12 45 47

Please note that the extension and everything works fine, it's just the spamming of the system log that is the issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug A bug that has been verified
Projects
None yet
Development

No branches or pull requests

4 participants