question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Bug: ACF Composer not publishing correctly / unavailable.

See original GitHub issue

Terms

Description

What’s wrong?

Sometimes packages cannot be published.

What have you tried?

Please see steps below.

What insights have you gained?

None.

Possible solutions

None I am aware of.

Temporary workarounds

Adding the Laravel service provider manually to /config/app.php will work occasionally.

Steps To Reproduce

Add ACF Composer to /sage/composer.json and update.

  "require": {
    "php": "^7.4|^8.0",
    "log1x/acf-composer": "^2.0",
    "roots/acorn": "^2.0.3"
  },

Discover packages:

wp acorn package:discover
Discovered Package: log1x/acf-composer
Discovered Package: nesbot/carbon
Discovered Package: roots/sage
Package manifest generated successfully.

Publish packages: (ACF Composer not in the list):

wp acorn vendor:publish

 Which provider or tag's files would you like to publish?:
  [0] Publish files from all providers and tags listed below
  [1] Provider: Roots\Acorn\Providers\AcornServiceProvider
  [2] Tag: acorn
 > 

Checking cache reveals ACF composer entry in array. /current/web/app/cache/acorn/framework/cache:

<?php return array (
  'log1x/acf-composer' => 
  array (
    'providers' => 
    array (
      0 => 'Log1x\\AcfComposer\\Providers\\AcfComposerServiceProvider',
    ),
  ),

Other packages can be discovered and published:

  "require": {
    "php": "^7.4|^8.0",
    "andreiio/blade-iconoir": "^1.4",
    "blade-ui-kit/blade-heroicons": "^1.3",
    "blade-ui-kit/blade-icons": "^1.2",
    "codeat3/blade-weather-icons": "^1.4",
    "log1x/acf-composer": "^2.0",
    "log1x/navi": "^2.0",
    "log1x/poet": "^2.0",
    "log1x/sage-html-forms": "^1.0",
    "roots/acorn": "^2.0.3"
  },
Discovered Package: andreiio/blade-iconoir
Discovered Package: blade-ui-kit/blade-heroicons
Discovered Package: blade-ui-kit/blade-icons
Discovered Package: codeat3/blade-weather-icons
Discovered Package: log1x/acf-composer
Discovered Package: log1x/navi
Discovered Package: log1x/poet
Discovered Package: log1x/sage-html-forms
Discovered Package: nesbot/carbon
Discovered Package: roots/sage
Package manifest generated successfully.
Which provider or tag's files would you like to publish?:
  [0 ] Publish files from all providers and tags listed below
  [1 ] Provider: AndreiIonita\BladeIconoir\BladeIconoirServiceProvider
  [2 ] Provider: BladeUI\Heroicons\BladeHeroiconsServiceProvider
  [3 ] Provider: BladeUI\Icons\BladeIconsServiceProvider
  [4 ] Provider: Codeat3\BladeWeatherIcons\BladeWeatherIconsServiceProvider
  [5 ] Provider: Log1x\Poet\PoetServiceProvider
  [6 ] Provider: Roots\Acorn\Providers\AcornServiceProvider
  [7 ] Tag: acorn
  [8 ] Tag: blade-heroicons
  [9 ] Tag: blade-heroicons-config
  [10] Tag: blade-iconoir
  [11] Tag: blade-icons
  [12] Tag: blade-weather-icons-config
  [13] Tag: blade-wi
  [14] Tag: config
 > 0

Copied Directory [/vendor/andreiio/blade-iconoir/resources/svg] To [/public/vendor/blade-iconoir]
Copied Directory [/vendor/blade-ui-kit/blade-heroicons/resources/svg] To [/public/vendor/blade-heroicons]
Copied Directory [/vendor/codeat3/blade-weather-icons/resources/svg] To [/public/vendor/blade-weather-icons]
Publishing complete.

Additional information and users with same problem can be found here: https://github.com/Log1x/acf-composer/issues/109

Expected Behavior

Expecting ACF Composer to be listed in the set of available packages to publish:

 [0 ] Publish files from all providers and tags listed below
  [1 ] Provider: AndreiIonita\BladeIconoir\BladeIconoirServiceProvider
  [2 ] Provider: BladeUI\Heroicons\BladeHeroiconsServiceProvider
  [3 ] Provider: BladeUI\Icons\BladeIconsServiceProvider
  [4 ] Provider: Codeat3\BladeWeatherIcons\BladeWeatherIconsServiceProvider
  [5 ] Provider: Log1x\Poet\PoetServiceProvider
  [6 ] Provider: Roots\Acorn\Providers\AcornServiceProvider
  [7 ] Tag: acorn
  [8 ] Tag: blade-heroicons
  [9 ] Tag: blade-heroicons-config
  [10] Tag: blade-iconoir
  [11] Tag: blade-icons
  [12] Tag: blade-weather-icons-config
  [13] Tag: blade-wi
  [14] Tag: config

Actual Behavior

ACF Composer package not becoming available.

Attempting to generate ACF Field, wp acorn acf:field Fleet results in: There are no commands defined in the "acf" namespace.

After adding and publishing additional packages, ACF Composer is listed in cache but not functioning:

<?php return array (
  'andreiio/blade-iconoir' => 
  array (
    'providers' => 
    array (
      0 => 'AndreiIonita\\BladeIconoir\\BladeIconoirServiceProvider',
    ),
  ),
  'blade-ui-kit/blade-heroicons' => 
  array (
    'providers' => 
    array (
      0 => 'BladeUI\\Heroicons\\BladeHeroiconsServiceProvider',
    ),
  ),
  'blade-ui-kit/blade-icons' => 
  array (
    'providers' => 
    array (
      0 => 'BladeUI\\Icons\\BladeIconsServiceProvider',
    ),
  ),
  'codeat3/blade-weather-icons' => 
  array (
    'providers' => 
    array (
      0 => 'Codeat3\\BladeWeatherIcons\\BladeWeatherIconsServiceProvider',
    ),
  ),
  'log1x/acf-composer' => 
  array (
    'providers' => 
    array (
      0 => 'Log1x\\AcfComposer\\Providers\\AcfComposerServiceProvider',
    ),
  ),
  'log1x/navi' => 
  array (
    'providers' => 
    array (
      0 => 'Log1x\\Navi\\Providers\\NaviServiceProvider',
    ),
    'aliases' => 
    array (
      'Navi' => 'Log1x\\Navi\\Facades\\Navi',
    ),
  ),
  'log1x/poet' => 
  array (
    'providers' => 
    array (
      0 => 'Log1x\\Poet\\PoetServiceProvider',
    ),
  ),
  'log1x/sage-html-forms' => 
  array (
    'providers' => 
    array (
      0 => 'Log1x\\HtmlForms\\HtmlFormsServiceProvider',
    ),
  ),
  'nesbot/carbon' => 
  array (
    'providers' => 
    array (
      0 => 'Carbon\\Laravel\\ServiceProvider',
    ),
  ),
  'roots/sage' => 
  array (
    'providers' => 
    array (
      0 => 'App\\Providers\\ThemeServiceProvider',
    ),
  ),
);

Relevant Log Output

No response

Versions

Acorn 2.0.3, Big Sur 11.6.1

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Comments:5 (2 by maintainers)

github_iconTop GitHub Comments

1reaction
Log1xcommented, Nov 3, 2022

And @retlehs I think this is a acorn specific issue.

This is not an Acorn issue and all related issues that may have caused this situation have long been fixed.

Also, you generally shouldn’t have to optimize:clear after requiring a package if you have your composer.json properly setup with post-autoload-dump.

"scripts": {
    "post-autoload-dump": [
        "Roots\\Acorn\\ComposerScripts::postAutoloadDump"
    ]
}
0reactions
ishigamicommented, Nov 6, 2022

Hi @Log1x, thanks for your reply.

Really, I didn’t have the post-autoload-dump entry in my composer.json. Now, I’ve added it.

Thank you very much, bro!

Read more comments on GitHub >

github_iconTop Results From Across the Web

Issue with publishing. Acf composer with sage 10 #109 - GitHub
Im trying to use acf composer with sage 10. ... Bug: ACF Composer not publishing correctly / unavailable. roots/acorn#210.
Read more >
Post not publishing or Updating - ACF Support
Hi, I am using ACF Version 5.3. 2.2 with Abomb theme, my problem is I can't publish new post or edit old post,...
Read more >
Installing plugins with composer not working correctly (Yoast ...
Hello, im currently working on a Wordpress project with Bedrock and Sage Theme. Im managing the Plugins with composer.
Read more >
Release notes - Visual Composer Help Center
Explore our changelog to get familiar with the latest updates. We are constantly improving Visual Composer with new features, improvements, and fixes.
Read more >
Admin menu not working correctly - User Role Editor
Hello, Just purchased and installed the pro version, i have some problems with the Admin menu addon : 1. Visual composer menu not...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found