avanzu / AdminThemeBundle

Admin Theme based on the AdminLTE Template for easy integration into symfony
MIT License
280 stars 148 forks source link

upgrade to 2.x - HELP #121

Closed hjanuschka closed 8 years ago

hjanuschka commented 8 years ago

following errors:

bin/console avanzu:admin:initialize 

 Installing theme assets as hard copies.
 installing bootstrap
 installing dist
 installing plugins
 installing documentation
 installing starter.html

  [InvalidArgumentException]                                                  
  The "vendor/almasaeed2010/adminlte/starter.html" directory does not exist.  

can be fixed by doing a rm vendor/almasaeed2010/adminlte/starter.html && mkdir vendor/almasaeed2010/adminlte/starter.html - wich is weird.

biggest problem is:

Fatal error: Uncaught exception 'Twig_Error_Syntax' with message 'Unknown "admin_style_path" function in "AvanzuAdminThemeBundle:layout:base-layout.html.twig" at line 17

i have no clou where admin_style_path() is comming from or what i did wrong - git grep'ed over the repo - no idea.

can you please help @avanzu (BTW i love this bundle)

hjanuschka commented 8 years ago

ok after diggin a bit deeper - the upgrade to 2.x seems to be pretty bad - as it breaks alot

e.g.:

will there be an upgrade guide - when is the 2.x to be release as a final, and master will point to it?!

hjanuschka commented 8 years ago

ok nevermind - i read the changelog about the breaking changes - right now i am porting :)

abotu the symlink error, with --symlink --relative it worked.

thx for your job!

avanzu commented 8 years ago

Yes, the 2.0 upgrade is quite radical in order to establish a more consistent naming across the whole bundle and to ged rid of most dependencies which were obsolete in most cases anyways.

In order to use the base-layout.html.twig with page_content and page_title again, it should be possible to create your own base-layout.html.twig in app/Resources/views according to the template override strategy, symfony uses.

As far as the 2.0 merge to master goes, i think i'll setup a 1.x support/maintenance branch so that it's still possible to release 1.x updates. But you might want to change your composer.json to use a specific release. Otherwise your could run into upgrade related issues out of the blue.

hjanuschka commented 8 years ago

thx for the fast reply - i am done with the refactoring - i exactly ended up doing my own base on top my already exsting base - that emulate page_content setting `avanzu_page_content``

overall - it is definitly worth the refactoring - its much cleaner now! many thx for keeping up the good work!

hjanuschka commented 8 years ago

just a minor question:

this one

<script src="{{ asset('bundles/avanzuadmintheme/vendor/adminlte/plugins/flot/jquery.flot.js') }}"></script>

got:

<script src="{{ asset('theme/plugins/flot/jquery.flot.js') }}"></script>

but now the theme is inside /web/ - is that ok ?

avanzu commented 8 years ago

Publishing the assets into web/theme is basically the same mechanic as symfony does with assets:install except that the path for the theme is theme instead of bundles. This is due to the fact that the actual theme files are now installed using composer which places the files on the same vendor level. Since the theme files are not "bundled" in a symfony sense, the assets:install won't affect them and that's where the avanzu:admin:initialize comes into play and why they are put into web/theme rather than web/bundles.

sakhunzai commented 7 years ago

@hjanuschka , how exactly you resolved the issue:

Unknown "admin_style_path" function in AvanzuAdminThemeBundle:layout:base-layout.html.twig at line 17.

I think this is not the only function which breaks , there are couple more there