Kirby 2.3.0 Beta

I already posted a teaser on Wednesday about the upcoming beta for 2.3.0 on Twitter and I’m glad that I can now finally publish it \o/

It’s another big step ahead and I can’t wait to hear what you think about it.

We are actively looking for feedback and testers who throw this at their existing sites (on a local machine, please) to report all sorts of bugs before the final release.

Please use this thread for your comments and the Github issues for bug reports.

We prepared a quite massive changelog for you to check out all the new stuff and we’ve also prepared a pretty fancy new “Upcoming…” page, which sums up everything for you: https://getkirby.com/upcoming

You will also find the first docs for the upcoming version on there. We overhauled the docs system in the background, to be able from now on, to mark changes with version numbers and give you a better overview what has changed and when.

We really hope you like it!!

8 Likes

Woohoooo! :smile:

First thing that I’ve noticed: the link to the changelog doesn’t work on the /upcoming page:

http://localhost/kirby/sites/getkirby.com/changelog/kirby-2-3-0

Going to read the rest now :slight_smile:

Let’s get to testing it, then :slight_smile:, just pulled it into a current project.

:slight_smile: should be fixed now!

The changelog (and some tweets) suggest in 2.3 one can add a template engine. I’d like to play around with this and try to plug in Twig. Any pointers on how to do that on the Kirby side?

(I know enough PHP and have used the Twig library so I’m good on this side. Just wondering if the changelog/tweets meant there are some hooks provided.)

The template engine is now a component. You can create your own class based on that class and register it using kirby()->component('template', 'YourClassName').

1 Like

sigh …still praying and hoping for page sections:cry:

1 Like

i’m Happy to testing Kirby 2.3.0 BETA :smiley: !! its really Cool :blush: thanks a lot to the Team For That Beautifull Work! :slight_smile:

1 Like

What a treat! Love the new handling of thumbs and the way they are stored now. And that the generation of thumbs is not blocking anymore is pure magic. Thanks a lot!

2 Likes

Don’t be too sad about your favorite missing feature :slight_smile: We work on so much stuff in parallel and sometimes it’s really just important to wrap it up at some point and bundle it into a new release before moving on. The new component and registry structure will make new stuff so much easier for us and for you and I’m very confident, that we will soon have some stuff to make you happy :slight_smile:

7 Likes

@bastianallgeier I am really looking forward to it :grinning: !

I try this 2.3.0 beta (kirby-nightly-2.3.0-20160408155818.zip) on XAMPP (Apache/2.4.9 (Win32) PHP/5.4.27).

This code from https://getkirby.com/docs/cheatsheet/file/thumb

<?php if($user = $site->user()): ?>

<!-- some html -->

<?php if($avatar = $user->avatar()): ?>
          <?php echo $avatar->thumb([
                                      'width'   => 100, 
                                      'height'  => 100, 
                                      'quality' => 80
                                    ])->html() ?>
<?php endif; ?>

<!-- some html -->

<?php endif; ?>

fails with

Fatal error: Call to undefined method Media::thumb() in C:\xampp\htdocs\kirby_basic\site\snippets\active_user.php on line 10

if the loged in user has an avatar (*.jpg).


[Added:]

If I dump($avatar); for the user tester I get:

Media Object
(
    [url] => http://127.0.0.1:61080/kirby_basic/assets/avatars/tester.png
    [root:protected] => C:\xampp\htdocs\kirby_basic\assets\avatars\tester.png
    [filename:protected] => tester.png
    [name:protected] => tester
    [extension:protected] => png
    [content:protected] => 
    [cache:protected] => Array
        (
        )

)

Try to remove the html() method at the end. The thumb() method creates an image tag.

Without ->html() the error is the same.

How have you defined $user?

The first line of that snippet is:

<?php if($user = $site->user()): ?>


Are you sure you want to assign to a variable inside a condition? If you do that the condition will always be true, so using if(){} seems useless here (but maybe that’s a PHP trick I’m not familiar with).

Edit: sorry, I was talking nonsense. :sweat_smile:

No, it will only be true if the result of $site->user() evaluates to true.
This is also the reason why you can do this in PHP:

$a = $b = $c = 'Something';
1 Like

The thumb()method is not implemented for the Media class, but only for the file class. The user avatar, however, is an object of type Media, not of type File.