Suddenly one day, I got the following error message when running
php artisan dusk :
This version of ChromeDriver only supports Chrome version 76
Since it came out of nowhere, I figured a simple update might help…
$ composer update
…but it didn’t. At least the error message changed:
Facebook\WebDriver\Exception\SessionNotCreatedException: session not created: Chrome version must be between 70 and 73
But after a bit of googling, this command solved the problem and I could run my tests again:
php artisan dusk:chrome-driver
I just ran a simple
composer require [...] command in a Laravel project on my local machine.
And so it begins!
PHP Fatal error: Allowed memory size of 1073741824 bytes exhausted [...]
Really? Locally, on my computer? Anyway, Composer has a helpful section covering this topic on the Troubleshooting page.
I’ve been working on my first Gatsby project recently: a headless WordPress blog!
I love all the smartness Gatsby gives you out of the box and how optimized for performance it is. For example, these are some of the things the
gatsby-image component takes care of:
So I ran a simple
composer global update command this afternoon — you won’t believe what happened then! 😱
I tried to start Laravel Valet as usual:
$ valet start
…but suddenly got this error message, which I haven’t seen before:
sudo: sorry, you are not allowed to preserve the environment
The solution turned out to be this:
$ sudo valet trust
valet start ran as expected 👌🏻 Hope this was helpful 🤗
Imagine having these categories in WordPress:
Then imagine a category page called Movies on which we wanna list the child categories, but only the first level.
So in this example, we just wanna see:
I recently found myself having a really strange and hard to solve problem. When moving a new WordPress site from the development server to production, Vimeo embeds suddenly didn’t work anymore.
After lots of googling, I found the following script:
If no headers is being printed, the server is blocking the Vimeo IP. So there’s nothing you can do about it yourself.
Instead, you have to contact your web host and ask them to help you.
The template could look something like this:
<posts-list category="<?php echo $category->term_id;?>"></posts-list>
But how could we populate the
data object with posts loaded asynchronously before the component is being rendered?
It’s quite simple actually, using the
created() lifecycle hook:
posts in the object returned by the
data function is set to
null from the start. Using Axios, the posts is being loaded and then assigned to the
That’s it! 🤗
In order to change the default markup which WordPress creates when inserting an image with a caption, the
img_caption_shortcode filter can be used.
For example, if you wanna wrap the image and caption with a
<figcaption> instead of the default
<div> , this is how you can do it:
What I wanted to do was something like this:
$terms = get_terms( 'my_custom_taxonomy', ['child_of' => 5] );
…but using the rest API provided by WordPress. This is how you make this query:
Easy when you know it, a bit tricky when you doesn’t! 🤷🏼♂️