Posts by pictus

    Hi,

    Im trying to setup a pagekit website on uberspace. The pagekit-site is in a subdirectory on a domain (example.com/pagekit). When I try to start the admin-panel with example.com/pagekit/admin I get an error 404. I need to use index.php/admin. In this case all href in the main navigation have an index.php entry.

    Example: example.com/pagekit/index.php/blog.

    Some Modules don't work with the index.php in the url.


    How can I modify my .htaccess to get pagekit working in a subdirectory?

    (edit: partialy solved see my __edit section)


    Apache Version: Apache/2.2.15 (CentOS)

    PHP Version: 7.1.12 @ fast-cgi


    __edit:

    while typing i found a part of the solution


    the htaccess of pagekit needs it's own RewriteBase

    Code
    1. # Set base if your site is running in a VirtualDocumentRoot
    2. RewriteBase /pagekit # for my case

    now I can use example.com/admin and get a correct redirect to the admin-panel


    BUT

    the navigation allready has `index.php/blog` in it´s href. How to solve this

    Is it possible to create childthemes, depending on parents?


    For Example, i want to change some small things in "One Theme" but want all future updates from "One Theme"

    yes, the update part is only for updating from version to version


    Code
    1. 'updates' => [
    2. '0.1' => function($app) {
    3.             // your code
    4.         },
    5. '0.2' => function($app) {
    6.             // your code
    7. },
    8. ]

    I found a solution. Need to modify some core files.

    Code
    1. // file: /app/system/app/vue.js
    2. // at the start, after "function install (Vue) {" add the following line:
    3. window.$vueInstances = [];
    4. // around line 100, find "fn = function() {" and replace "new Vue()" with
    5. window.$vueInstances.push(new Vue(options));


    Now create a Package and add a script file, in this script file you can reference the instances.

    In my example im listening on $broadcast('save') in app/system/modules/site/app/views/edit.js so my dependencies in script registration are ~node-page.


    Will try to make a pull-request, is there a prefered name for $vueInstances in window?

    But you can easily also use the debug Toolbar for AJAX requests as far as I know:

    Go to tab "Requests" and click on the Id of the request you want to see. Then the debug toolbar refreshes and you can see the data for this particular request. The only issue might be that you need to reload the tab to see the result of the AJAX request in the toolbar.

    thats sounds nice, i will try it out

    Is it possible to get the Current running Vue instance? To listen to the Broadcast events?


    Example of an Broadcasting Event

    Code
    1. // file: app/system/modules/site/app/views/edit.js
    2. //..
    3. methods: {
    4.     save: function() {
    5.         var data = {node: this.node};
    6.         
    7.         this.$broadcast('save', data);
    8.         // ..


    I found the instance is created in app/system/app/vue.js. Or is it initialized anywhere else?

    In window Object in Browser there is a Vue object, but thats not the instance.

    I want to call vue.$on, on the current vue instance or any other listiener method, to listen to those broadcast events published in vue methods.

    Hi,

    I enabled the Developer-Toolbar to log some information. But Informations that are thrown while ajax requests are not thrown in the "Log" panel of the toolbar.


    For example

    Is there any other way to log in Developer-Toolbar while Ajax calls? Is there any other way to log while those calls?


    The only Solution i found, is using FirePHP Core and FirePHP extension, so i can log to DeveloperTools Console of my Browser, but i think there is a better way to do that.


    Code
    1. 'model.page.saved' => function($event, $model) {
    2. // this does not work
    3. Application::log(100, 'saved');
    4. // quick and dirty solution, but it works
    5. require('FirePHPCore/fb.php');
    6. fb('Page Saved');
    7. },