Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Activity
    6real
    @6real
    Hi !
    I use last version of the theme with tailwind, there are any way to use a tailwind.config.json for customize it ? Thanks
    I test to add to theme root, but not working
    Also i see in vendor, a tailwindcss.js, so i try to create a tailwindcss.js in "resources/scripts/frontend" and include it to index.js but also not working
    6real
    @6real
    Ok, with tailwindcss.js in 'resources/build' it's working 😉
    Tom K.
    @tomkeysers

    Hi, I just updated my wpemerge-theme to 0.17.1 and I'm getting the following error:

    [12-May-2022 15:24:33 UTC] PHP Warning:  Use of undefined constant WPEMERGE_APPLICATION_FILESYSTEM_KEY - assumed 'WPEMERGE_APPLICATION_FILESYSTEM_KEY' (this will throw an Error in a future version of PHP) in /Users/tomk/Local Sites/tsrcbedrock/app/bedrock/web/app/themes/wpemerge-theme/vendor/htmlburger/wpemerge/src/Application/ApplicationServiceProvider.php on line 50
    [12-May-2022 15:24:33 UTC] PHP Stack trace:
    [12-May-2022 15:24:33 UTC] PHP   1. {main}() /Users/tomk/Local Sites/tsrcbedrock/app/bedrock/web/index.php:0
    [12-May-2022 15:24:33 UTC] PHP   2. require() /Users/tomk/Local Sites/tsrcbedrock/app/bedrock/web/index.php:6
    [12-May-2022 15:24:33 UTC] PHP   3. require_once() /Users/tomk/Local Sites/tsrcbedrock/app/bedrock/web/wp/wp-blog-header.php:13
    [12-May-2022 15:24:33 UTC] PHP   4. require_once() /Users/tomk/Local Sites/tsrcbedrock/app/bedrock/web/wp/wp-load.php:55
    [12-May-2022 15:24:33 UTC] PHP   5. require_once() /Users/tomk/Local Sites/tsrcbedrock/app/bedrock/web/wp-config.php:9
    [12-May-2022 15:24:33 UTC] PHP   6. include() /Users/tomk/Local Sites/tsrcbedrock/app/bedrock/web/wp/wp-settings.php:555
    [12-May-2022 15:24:33 UTC] PHP   7. WPEmerge\Application\Application->bootstrap() /Users/tomk/Local Sites/tsrcbedrock/app/bedrock/web/app/themes/wpemerge-theme/functions.php:52
    [12-May-2022 15:24:33 UTC] PHP   8. WPEmerge\Application\Application->loadServiceProviders() /Users/tomk/Local Sites/tsrcbedrock/app/bedrock/web/app/themes/wpemerge-theme/vendor/htmlburger/wpemerge/src/Application/Application.php:87
    [12-May-2022 15:24:33 UTC] PHP   9. WPEmerge\Application\Application->registerServiceProviders() /Users/tomk/Local Sites/tsrcbedrock/app/bedrock/web/app/themes/wpemerge-theme/vendor/htmlburger/wpemerge/src/Application/LoadsServiceProvidersTrait.php:81
    [12-May-2022 15:24:33 UTC] PHP  10. WPEmerge\Application\ApplicationServiceProvider->register() /Users/tomk/Local Sites/tsrcbedrock/app/bedrock/web/app/themes/wpemerge-theme/vendor/htmlburger/wpemerge/src/Application/LoadsServiceProvidersTrait.php:94
    [12-May-2022 15:24:33 UTC] PHP Warning:  Use of undefined constant WPEMERGE_APPLICATION_FILESYSTEM_KEY - assumed 'WPEMERGE_APPLICATION_FILESYSTEM_KEY' (this will throw an Error in a future version of PHP) in /Users/tomk/Local Sites/tsrcbedrock/app/bedrock/web/app/themes/wpemerge-theme/app/src/WordPress/AssetsServiceProvider.php on line 29

    Although I did a composer install and yarn install again after updating the files, so the new wpemerge core is present with define( 'WPEMERGE_APPLICATION_FILESYSTEM_KEY', 'wpemerge.application.filesystem' ); in vendor/htmlburger/wpemerge/config.php... But still I'm getting this error
    Any ideas?

    17 replies
    Tom K.
    @tomkeysers
    Or could this be a namespace (renaming) issue?
    codemonkeynorth
    @codemonkeynorth
    hi. is there a subsitute for Timber's image functions & filters eg resize https://timber.github.io/docs/reference/timber-imagehelper/#resize (or rather a technique / library people use with WPEmerge)
    codemonkeynorth
    @codemonkeynorth
    i see utilities has something but i'm not sure how its usage in a template compares https://docs.wpemerge.com/#/starter/utilities/image .. like we can do this in Timber <img src="{{ post.thumbnail.src|resize(300, 500) }}" alt="A basketball player" />
    Atanas Angelov
    @atanas-dev
    That's exactly the same way you'd use \MyApp::core()->image()->thumbnail( $attachment_id, $width, $height, $crop = true ) - it returns the generated thumbnail URL so you can pass it as the src attribute of an img tag:
    <img src="<?php echo esc_url( \MyApp::core()->image()->thumbnail( $attachment_id, 300, 500) ); ?>" alt="" />
    codemonkeynorth
    @codemonkeynorth
    atanas, thanks I realised that after. I can prob make a custom twig filter to make it a little neater
    codemonkeynorth
    @codemonkeynorth
    Is there a changelog ? Nothing on blog since 0.16. Thanks
    Atanas Angelov
    @atanas-dev

    Changelogs are always added to the releases in GitHub:
    https://github.com/htmlburger/wpemerge/releases

    Writing a blog post is always a good idea but I haven't gotten to it.

    codemonkeynorth
    @codemonkeynorth
    ah cool thanks.
    Paulo Ferreira
    @paulomfr
    Screen Shot 2022-05-20 at 21.42.30.png
    Hello guys! I'm having an issue, can someone help me?
    I defined a web route condition that match a post_template but when trying to load the page, I'm having an error saying that the named parameter $post_template is unknown.
    Atanas Angelov
    @atanas-dev
    This looks like a PHP8 issue - what version of htmlburger/wpemerge are you using?
    Paulo Ferreira
    @paulomfr
    @atanas-dev 0.16.0
    Paulo Ferreira
    @paulomfr
    @atanas-dev , I updated all packages htmlburger/* to 0.17.0, now is working. Thank you!
    codemonkeynorth
    @codemonkeynorth
    Hi I’m assuming yarn release strips out source code / dev stuff , but is it possible we could have a command that creates a new eg mytheme-release folder without the zipping?
    as I tend to just want to ftp/diff my release version , so currently I’d need to just unzip it again anyway
    codemonkeynorth
    @codemonkeynorth
    Sorry I’m being stupid it already creates that folder? Not used it for a while and just noticed the 0.16 notes
    1 reply
    codemonkeynorth
    @codemonkeynorth
    Anyone used this with Bedrock/WPEngine ? Essentially It’ll deploy a bedrock project to wpengine (minus uploads) by shifting the files back (in a temp build) to their expected standard WP structure and deploying . https://github.com/hello-jason/bedrock-deploy-to-wpengine
    Could be useful if that’s your host but I’ve not tried it
    So you can dev with bedrock locally but have it work with WPEngine’s traditional WP setup
    codemonkeynorth
    @codemonkeynorth
    Ah ok thanks I’ll just have to unzip it or manually ftp the main theme folder without the dev files . However if you could consider adding it back it would be useful i think . I use beyond compare and generally I’m only uploading diffs anyway to be honest so it’s not that big a deal
    Atanas Angelov
    @atanas-dev
    There are no plans to bring it back for now, but adjusting the release command is easy enough:
    https://github.com/htmlburger/wpemerge-theme/blob/master/resources/build/release/release.js#L42
    destination is a temporary directory that you can copy to somewhere before the release command finishes :)
    codemonkeynorth
    @codemonkeynorth
    Cool thanks
    codemonkeynorth
    @codemonkeynorth
    what's the chances wpemerge-twig will be updated to work with PHP 8 , 0.17 etc ?
    htmlburger/wpemerge-twig 0.16.0 requires php ^7.0 which does not match your installed version 8.0.0.
    ```Problem 1
    - Root composer.json requires htmlburger/wpemerge-twig ^0.16.0 -> satisfiable by htmlburger/wpemerge-twig[0.16.0].       
    - htmlburger/wpemerge-twig 0.16.0 requires htmlburger/wpemerge ~0.16.0 -> found htmlburger/wpemerge[0.16.0] but it conflicts with your root composer.json require (~0.17.0).```
    (if i use --ignore-platform-reqs)
    codemonkeynorth
    @codemonkeynorth
    hmm i thought there were default twig templates for the alternative views. i guess not
    Atanas Angelov
    @atanas-dev
    Unfortunately, I'm spread too thin to be able to devote time to the Twig extension. Technically it should be fine and work but as you mentioned there are no alternative views prepared for it either.
    codemonkeynorth
    @codemonkeynorth
    Ideally I want the opinionated framework of WPEmerge (webpack, assets, tailwind etc) but with some of the functionality of timber. (Because my other designer/developer only knows Timber currently and timescale is short). I wonder how well they would merge together if I install Timber alongside and don’t use its render . Kind of overkill I know!
    I’m assuming the htmlburger twig and timber’s twig would clash somehow? But the first one is required to integrate with WPEmerge
    codemonkeynorth
    @codemonkeynorth
    Really I want to move them over to blade eventually but this is kind of an intermediary project
    codemonkeynorth
    @codemonkeynorth
    @atanas-dev an easy way to bypass the constraint? I tried cloning htmlburger/wpemerge-twig locally and then messing with the versions but I'm wondering if i can do this in my composer.json somehow?
    Atanas Angelov
    @atanas-dev
    There's probably a way but I can't really say for sure.
    Worst case you can copy the source of wpemerge-twig, change the version and point composer to the local files rather than the remote package.
    codemonkeynorth
    @codemonkeynorth
    i forked it temporarily, but i'll remove the repo and add it locally.. fudged it with this
    "require": { "php": ">7.0", "twig/twig": "^2.4", "htmlburger/wpemerge": ">0.16.0" }
    i'm actually seeing how i might integrate Timber into WPEmerge at the moment anyway.. undecided on basing it on the WPEmerge blade theme or the Timber starter theme and then seeing how they can integrate ... obviously there's an App::render and a Timber::render
    and the approach is quite different on the 2 themes
    codemonkeynorth
    @codemonkeynorth
    hmm i dont think you have a way to run php functions in the twig templates? i know timber gives you fn (or function) eg {{ fn('output_something') }} etc and {% if fn('is_singular') %}
    codemonkeynorth
    @codemonkeynorth
    hmm i guess there's quite a lot to integrating this.. i'm not sure what App::render provides differently to Timber::render but obviously Timber::render is used to do specific operations on eg the post.content which App::render doesn't.. i might have to abandon it and make my designer/dev learn blade :P
    codemonkeynorth
    @codemonkeynorth
    ok it's a pretty deep rabbit hole ;) Timber adds a lot to twig
    codemonkeynorth
    @codemonkeynorth
    if i only understood the wpemerge-twig View/ServiceProvider stuff enough but it's way beyond me, being able to run Timber instead of just Twig would be really useful, but it's a framework in itself...
    or rather the template , template functions & post context etc parts of Timber