Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Repo info
Activity
  • Oct 21 16:21
    jlambe opened #747
  • Oct 21 16:21
    jlambe labeled #747
  • Oct 17 08:08
    Bartiff commented #732
  • Oct 16 11:53
    arjendejong12 commented #703
  • Oct 12 06:23
    guramsutidze edited #746
  • Oct 12 05:20
    guramsutidze edited #746
  • Oct 11 20:45
    guramsutidze opened #746
  • Oct 11 07:20

    jlambe on master

    Avoid exception when boolean da… fix `rootUrl()` double slashes;… Add: Extra space before asset c… and 5 more (compare)

  • Oct 11 07:19
    jlambe closed #745
  • Oct 11 07:19

    jlambe on 2.0

    Fix #745. Checkbox checked attr… (compare)

  • Oct 11 07:18
    jlambe labeled #745
  • Oct 11 07:18
    jlambe labeled #745
  • Oct 11 07:18
    jlambe assigned #745
  • Oct 11 07:18
    jlambe milestoned #745
  • Oct 11 07:17
    jlambe opened #745
  • Oct 11 04:53
    jlambe closed #413
  • Oct 08 15:59
    jlambe milestoned #744
  • Oct 08 15:55
    jlambe labeled #744
  • Oct 08 15:55
    jlambe labeled #744
  • Oct 08 15:54
    jlambe commented #744
David Pache
@Dave3o3
i see a solution like:
Vagrantfile -> (optional: ansible provisioner) -> install docker -> run docker-compose
so in the end you have your local docker-vm setup with vagrant up
and for those who don’t want the VM, they can use the plain docker-compose
Julien Lambé
@jlambe
Sounds like a good compromise. Personnaly I would like to get rid of a the vm. Do you have a testable environment like this ?
David Pache
@Dave3o3
no, i have to set it up. this was just loud thinking :D
but i like to try it
Julien Lambé
@jlambe
:thumbsup: This is not my priority for the moment but if you have something to test someday, I’d love to try :wink:
David Pache
@Dave3o3

short question regarding the needed extensions: the intl extension is already bundled with php, right?

This extension is bundled with PHP as of PHP version 5.3.0. Alternatively, the PECL version of this extension may be used with all PHP versions greater than 5.2.0 (5.2.4+ recommended).

Julien Lambé
@jlambe
It is a native one but not always enabled on compilation. For example, by default on my mac, the extension is missing on default php. You can install it through PECL or if you compile PHP, just add the --enable-intl option.
On a Homestead environment it is enabled and normally most host providers compile it.
David Pache
@Dave3o3
k, thanks
Ghost
@ghost~5b695616d73408ce4fa3c027
@jlambe Thanks for the list of features :)
Ghost
@ghost~5b695616d73408ce4fa3c027
You said there's a new custom fields API based on ReactJs components, could you elaborate?
Julien Lambé
@jlambe
@JaspervanV_gitlab The custom fields interface is built only with javascript. When you define a custom field for a metabox, its UI is handled by a js component built with ReactJs. This is only available when working with metabox and custom fields. Custom fields for settings page or regular forms, are html only.
Ghost
@ghost~5b695616d73408ce4fa3c027
ah okay, thanks
Marc Wieland
@marcwieland95
Has anyone experience with Themosis and Gutenberg? How do you structure the blocks inside the framework? Logic, view, etc.
Julien Lambé
@jlambe
@marcwieland95 I’ve planned to work on blocks this end of the week for a project. Currently there is no recommendation to write blocks but we can surely share our own experience about this and figure out one.
Marc Wieland
@marcwieland95
Sounds good. I'm working on projet right now .
I'm using ACF Blocks for the moment. They provide a callback function for the template. Inside this function I'd like to init a BlockController. At this point I'm failing. I don't get dependency injection to work there
Marc Wieland
@marcwieland95
The question is how do you init a controller class? Inside the router there's a lot of magic behind this CLASS@METHOD syntax I guess. But I can't find code inside the framework.
Julien Lambé
@jlambe
@marcwieland95 Basically controller dependencies are handled automatically wherever you use it. Auto-injection does not work if called from an Action::add method because it’s not handled by the service container, it is handled by call_user_func functions which cannot resolve dependencies. I’ve tried to find a way to make use of the service container for hook classes but without luck.
Marc Wieland
@marcwieland95
Ah okay. Exactly that's what happens inside the ACF callback
Marc Wieland
@marcwieland95

@jlambe When I call something like that:

$controller = new BlockController();
$controller->map($block, $content, $is_preview);

I should be able to resolve models inside the controller, right? public function map(Post $post, $post_new) {
This is not the case. I get an error: Argument 1 passed to Theme\Controllers\BlockController::map() must be an instance of Theme\Models\Post, array given

Julien Lambé
@jlambe
When calling a method directly, you have to pass expected objects. Personnaly I’ve never had to call a controller this way. So if your map method signature is expecting as the first argument a Post model, your $block variable must be an instance of such model. The controller will not try to convert it if this is something you were expected.
Marc Wieland
@marcwieland95
I init the class inside the method now. It doesn't make sense to couple it in this way
Do you already have any further ideas about using blocks inside Themosis?
Julien Lambé
@jlambe
I work on blocks this afternoon regarding a project. I’ll have better insights to share early next week.
Marc Wieland
@marcwieland95
Ok, perfect. Let me know
swaraasolutions
@swaraasolutions
@jlambe couple of issues i found when trying to integrate Themosis 2.0 on windows, linux worked like a charm
  • addLocation function under Finder.php the path is being defined however for windows the path starts with /D: due to this the assets are always not found if we remove the additional / in front of the path it works great
Julien Lambé
@jlambe
@swaraasolutions Thanks for reporting this issue. Can you post it under the framework repository or perhaps could you make a pull request? https://github.com/themosis/framework/issues Thanks
swaraasolutions
@swaraasolutions
@swaraasolutions Thanks for reporting this issue. Can you post it under the framework repository or perhaps could you make a pull request? https://github.com/themosis/framework/issues Thanks
i will generate a pull request first thing monday morning IST
swaraasolutions
@swaraasolutions
@jlambe have added my first pull so let me know if there are any issues
Julien Lambé
@jlambe
@swaraasolutions I’ll checked it. Thanks!
Nicholas Tsim
@ntsim

Hi @jlambe , loving the work on v2! I'm glad that someone is trying to make Wordpress bearable! :smile:

Just wondering what your feelings about where views/assets should go in the project structure. I'm getting the impression that these should generally be going in the project's theme directory, but for my use-case (a single Wordpress app), I can't really think of a compelling reason to do this.

My initial thoughts would be to actually hoist everything to root-level views/assets directories as it seems like it would make working on my project easier, particularly because:

  • Not having to traverse down to the project theme to build assets
  • More Laravel-y project structure
  • Would make use of the root-level views directory (would just be empty otherwise?)

On the other-hand, I'm quite new to Themosis, so I'm not sure if there are potential downsides to this kind of approach?

Julien Lambé
@jlambe
Hi @ntsim, personally I keep my views inside the theme. The idea is to still be able to swap all application output by simply changing the theme. I use root application views for « shared » views or for anything that goes inside the WordPress administration.
Nicholas Tsim
@ntsim
Awesome thanks for the input @jlambe. I think I'll go with this approach so I'm not going too far off the Themosis way of doing things :thumbsup:
JasperV
@Mantik_gitlab
I'm hosting generated API docs of Themosis on my website. Some of y'all might find it useful. :)
https://docs.jasperv.dev/themosis/2.0/
swaraasolutions
@swaraasolutions
@jlambe excellent work with 2.0 just wanted to check when can we expect the infinite fields back in 2.0?
Julien Lambé
@jlambe
@Mantik_gitlab This is super cool! It would be cool to point to it somehow on the current documentation website.
@swaraasolutions No date defined yet. It might take a long time before it is merged back into core. I suggest you look at dedicated plugins like ACF for example if you need some sort of repeater field. Sorry :(
JasperV
@Mantik_gitlab
@jlambe thanks fam, it's generated with Sami; the same thing Laravel & Symfony use.
It's really easy to setup, so you could set it up yourself and host it on themosis.com. If you want the config I use just hit me up with a DM.
But it'll be available on my site for a long time :)
I have a daily cronjob setup, so it automatically updates
mclaurent
@mclaurent
Hi
Has anybody had any issues with cookies being set automatically with the 2.x Themosis? I am seeing a "themosis_session" being set after setting up 2.0, but I have no idea where it is coming from or what it is being used for. It's causing me issues with page caching, and ideally would like to remove it as I don't believe it is being used anywhere?
mclaurent
@mclaurent
@mclaurent So I have worked out that this is set in app/config/session however I don't know WHY this would be needed? Is anybody able to shed light on the purpose of this and whether it is safe to remove?
Julien Lambé
@jlambe
@mclaurent The themosis_session cookie is used in order to identify each user session. It's a random value generated by the session package in order to use session in your application for both anonymous users or authenticated ones. If you do not use session in your app, you can remove it.
jyme
@jyme
Hi everybody i have a question about Themosis v2.0 :). I would like to know if is possible to display Field in a metabox depending result from other field?
vasikgreif
@vasikgreif
@jlambe Hello , I can see there's support for handling the translations from the app directory (themosis/framework@5bf32e0), but I did not find an example on how to use that
am I missing something?
mclaurent
@mclaurent
@jlambe Thank you - How do I go about removing it? I tried removing the config/session.php but that just caused an error, I think it's linked to the Symfony Request package.. Is there a setting I can set in the session.php to just disable that cookie?
Luke Abell
@LukeAbell
Hey guys! Long time Themosis user/lover. We're working on upgrading from v1.3 to v2. The only thing we're stuck on is getting routes to work in our theme. I'm registering them just like this but they aren't being honored https://github.com/themosis/theme/blob/master/resources/Providers/RouteServiceProvider.php#L32
mclaurent
@mclaurent
Has anybody had any luck TWIGging the wp-activate pages? I.e. when a user account is activated we want that page to be in-brand rather than default WordPress? I think the only way would be using the tempate-parts folder which would then call a Twig template, like below, but that's less than ideal...
echo app('Twig_Environment')->render('partials/global/activate/activate-header.twig')