Giter VIP home page Giter VIP logo

Comments (18)

parmando avatar parmando commented on August 21, 2024 1

Perfect! Problem solved, thank you!
https://www.otimo.site/admin

from phpagebuilder.

leonp5 avatar leonp5 commented on August 21, 2024 1

@HansSchouten yes, sorry. I don't use nano often so i didn't realize that there was something missing when i copied it from the server.

So here is the start of the config:

<?php

return [
    /*
     |--------------------------------------------------------------------------
     | General settings
     |--------------------------------------------------------------------------
     |
     | General settings for configuring the PageBuilder.
     |
     */
    'general' => [
        'base_url' => 'http://localhost',
        'language' => 'en',
        'assets_url' => '/assets',
        'uploads_url' => '/uploads'
    ],

I changed base_url to 'base_url' => 'http://test.e-hilfe.com/' and now it works too here :) Thanks!

from phpagebuilder.

HansSchouten avatar HansSchouten commented on August 21, 2024

The page not found is triggered at various locations in this file: https://github.com/HansSchouten/PHPageBuilder/blob/master/src/PHPageBuilder.php#L284

It triggers when phpb_in_module() is not matched for any of the pagebuilder modules.

Can you add some debug output here to check why it does not detect the modules. For example dump the $url and $currentUrl.

from phpagebuilder.

leonp5 avatar leonp5 commented on August 21, 2024

@HansSchouten thanks for your answer 👍

Output of $url in the helpers.php: string(11) "/admin/auth"

Output of $currentUrl in the helpers.php: string(8) "/lfe.com"

There seems to be a fault. The domain is: test.e-hilfe.com

from phpagebuilder.

HansSchouten avatar HansSchouten commented on August 21, 2024

Can you list the contents of your config, maybe there is an issue over there? Especially the general -> base_url.

Or else try debugging this method, which generated the $currentUrl: https://github.com/HansSchouten/PHPageBuilder/blob/master/src/Core/helpers.php#L240

from phpagebuilder.

parmando avatar parmando commented on August 21, 2024

Do we have a solution?
I have the same problem here:
https://www.otimo.site/

from phpagebuilder.

parmando avatar parmando commented on August 21, 2024

I think there's something wrong with .htaccess ...
Here is an echo "hello world!"; and even that doesn't work:
https://www.otimo.site/hello.php

from phpagebuilder.

parmando avatar parmando commented on August 21, 2024

Detail I don't have the composer installed, would that be?

from phpagebuilder.

HansSchouten avatar HansSchouten commented on August 21, 2024

We don't have a solution since there is not yet any debug output. I don't have this issue myself so I cannot solve it right now.

It should work just fine without composer. Can you try this:

Can you list the contents of your config, maybe there is an issue over there? Especially the general -> base_url.

Or else try debugging this method, which generated the $currentUrl: https://github.com/HansSchouten/PHPageBuilder/blob/master/src/Core/helpers.php#L240

from phpagebuilder.

parmando avatar parmando commented on August 21, 2024

See in:
https://www.otimo.site/

I added echo phpb_current_full_url (); in index.php

from phpagebuilder.

leonp5 avatar leonp5 commented on August 21, 2024

Can you list the contents of your config, maybe there is an issue over there? Especially the general -> base_url.

Or else try debugging this method, which generated the $currentUrl: https://github.com/HansSchouten/PHPageBuilder/blob/master/src/Core/helpers.php#L240

Do you mean this config?

Or where do i find the general->base_url?

  GNU nano 2.9.3                                                                                                                                                                                                                                                                                                           config.php                                                                                                                                                                                                                                                                                                                      

        'class' => PHPageBuilder\Modules\Auth\Auth::class,
        'url' => '/admin/auth',
        'username' => 'admin',
        'password' => '*****'
    ],

    /*
     |--------------------------------------------------------------------------
     | WebsiteManager settings
     |--------------------------------------------------------------------------
     |
     | By default a basic WebsiteManager is provided for creating/editing pages.
     |
     */
    'website_manager' => [
        'use_website_manager' => true,
        'class' => PHPageBuilder\Modules\WebsiteManager\WebsiteManager::class,
        'url' => '/admin'
    ],

    /*
     |--------------------------------------------------------------------------
     | Website settings
     |--------------------------------------------------------------------------
     |
     | By default a setting class is provided for accessing website settings.
     |
     */
    'setting' => [
        'class' => PHPageBuilder\Setting::class
    ],

    /*
     |--------------------------------------------------------------------------
     | PageBuilder settings
     |--------------------------------------------------------------------------
     |
     | By default a PageBuilder is provided based on GrapesJS.
     |
     */
    'pagebuilder' => [
        'class' => PHPageBuilder\Modules\GrapesJS\PageBuilder::class,
        'url' => '/admin/pagebuilder',
        'actions' => [
            'back' => '/admin'
        ]
    ],

    /*
     |--------------------------------------------------------------------------
     | Page settings
     |--------------------------------------------------------------------------
     |
     | By default a Page class is provided with knowledge about its layout and URL.
     |
     */
    'page' => [
        'class' => PHPageBuilder\Page::class,
        'table' => 'pages',
        'translation' => [
            'class' => PHPageBuilder\PageTranslation::class,
            'table' => 'page_translations',
            'foreign_key' => 'page_id',
        ]
    ],

    /*
     |--------------------------------------------------------------------------
     | Theme settings
     |--------------------------------------------------------------------------
     |
     | PageBuilder requires a themes folder in which for each theme the individual
     | theme blocks are defined. A theme block is a sub folder in the themes folder
     | containing a view, model (optional) and controller (optional).
     |
     */
    'theme' => [
        'class' => PHPageBuilder\Theme::class,
        'folder' => __DIR__ . '/themes',
        'folder_url' => '/themes',
        'active_theme' => 'demo'
    ],

    /*
     |--------------------------------------------------------------------------
     | Routing settings
     |--------------------------------------------------------------------------
     |
     | Settings for resolving pages based on the current URI.
     |
     */
    'router' => [
        'class' => PHPageBuilder\Modules\Router\DatabasePageRouter::class
    ],

    /*
     |--------------------------------------------------------------------------
     | Class replacements
     |--------------------------------------------------------------------------
     |
     | Allows mapping a class namespace to an alternative namespace,
     | useful for replacing implementations of specific pagebuilder classes.
     | Example: PHPageBuilder\UploadedFile::class => Alternative\UploadedFile::class
     | Important: when overriding a class always extend the original class.
     |
     */
    'class_replacements' => [
    ],
];

Here i used var_dump to get the variables in phpb_current_full_url():

string(18) "protocol_variable:" string(4) "http" 
string(17) "currentFullUrl_1:" string(24) "http://test.e-hilfe.com/"
 string(17) "currentFullUrl_2:" string(23) "http://test.e-hilfe.com" 

from phpagebuilder.

parmando avatar parmando commented on August 21, 2024

I installed on other servers and the result was the same, I think this works only on the developer server kkkkkkkkkk

from phpagebuilder.

HansSchouten avatar HansSchouten commented on August 21, 2024

@leonp5 In your output I am missing the beginning of the config file. In this line it states the base_url: https://github.com/HansSchouten/PHPageBuilder/blob/master/config/config.example.php#L13

from phpagebuilder.

parmando avatar parmando commented on August 21, 2024

My config looks like this:

`<?php

return [
/*
|--------------------------------------------------------------------------
| General settings
|--------------------------------------------------------------------------
|
| General settings for configuring the PageBuilder.
|
*/
'general' => [
'base_url' => 'https://otimo.site',
'language' => 'en',
'assets_url' => '/assets',
'uploads_url' => '/uploads'
],

/*
 |--------------------------------------------------------------------------
 | Storage settings
 |--------------------------------------------------------------------------
 |
 | Database and file storage settings.
 |
 */
'storage' => [
    'use_database' => true,
    'database' => [
        'driver'    => 'mysql',
        'host'      => 'localhost',
        'database'  => 'otimo_xxx',
        'username'  => 'otimo_xxx',
        'password'  => 'xxx',
        'charset'   => 'utf8',
        'collation' => 'utf8_unicode_ci',
        'prefix'    => '',
    ],
    'uploads_folder' => __DIR__ . '/uploads'
],

/*
 |--------------------------------------------------------------------------
 | Auth settings
 |--------------------------------------------------------------------------
 |
 | By default an authentication class is provided which checks for the
 | credentials configured in this setting block.
 |
 */
'auth' => [
    'use_login' => true,
    'class' => PHPageBuilder\Modules\Auth\Auth::class,
    'url' => '/admin/auth',
    'username' => 'admin',
    'password' => 'changethispassword'
],

/*
 |--------------------------------------------------------------------------
 | WebsiteManager settings
 |--------------------------------------------------------------------------
 |
 | By default a basic WebsiteManager is provided for creating/editing pages.
 |
 */
'website_manager' => [
    'use_website_manager' => true,
    'class' => PHPageBuilder\Modules\WebsiteManager\WebsiteManager::class,
    'url' => '/admin'
],

/*
 |--------------------------------------------------------------------------
 | Website settings
 |--------------------------------------------------------------------------
 |
 | By default a setting class is provided for accessing website settings.
 |
 */
'setting' => [
    'class' => PHPageBuilder\Setting::class
],

/*
 |--------------------------------------------------------------------------
 | PageBuilder settings
 |--------------------------------------------------------------------------
 |
 | By default a PageBuilder is provided based on GrapesJS.
 |
 */
'pagebuilder' => [
    'class' => PHPageBuilder\Modules\GrapesJS\PageBuilder::class,
    'url' => '/admin/pagebuilder',
    'actions' => [
        'back' => '/admin'
    ]
],

/*
 |--------------------------------------------------------------------------
 | Page settings
 |--------------------------------------------------------------------------
 |
 | By default a Page class is provided with knowledge about its layout and URL.
 |
 */
'page' => [
    'class' => PHPageBuilder\Page::class,
    'table' => 'pages',
    'translation' => [
        'class' => PHPageBuilder\PageTranslation::class,
        'table' => 'page_translations',
        'foreign_key' => 'page_id',
    ]
],

/*
 |--------------------------------------------------------------------------
 | Theme settings
 |--------------------------------------------------------------------------
 |
 | PageBuilder requires a themes folder in which for each theme the individual
 | theme blocks are defined. A theme block is a sub folder in the themes folder
 | containing a view, model (optional) and controller (optional).
 |
 */
'theme' => [
    'class' => PHPageBuilder\Theme::class,
    'folder' => __DIR__ . '/themes',
    'folder_url' => '/themes',
    'active_theme' => 'demo'
],

/*
 |--------------------------------------------------------------------------
 | Routing settings
 |--------------------------------------------------------------------------
 |
 | Settings for resolving pages based on the current URI.
 |
 */
'router' => [
    'class' => PHPageBuilder\Modules\Router\DatabasePageRouter::class
],

/*
 |--------------------------------------------------------------------------
 | Class replacements
 |--------------------------------------------------------------------------
 |
 | Allows mapping a class namespace to an alternative namespace,
 | useful for replacing implementations of specific pagebuilder classes.
 | Example: PHPageBuilder\UploadedFile::class => Alternative\UploadedFile::class
 | Important: when overriding a class always extend the original class.
 |
 */
'class_replacements' => [
],

];
`

from phpagebuilder.

HansSchouten avatar HansSchouten commented on August 21, 2024

Can you try the https://www.otimo.site/ as base_url. You don't have the www in your base_url. This is necessary since if I go to https://otimo.site it redirects me to https://www.otimo.site.

from phpagebuilder.

HansSchouten avatar HansSchouten commented on August 21, 2024

If you don't want www you can comment some lines in the .htaccess file

from phpagebuilder.

HansSchouten avatar HansSchouten commented on August 21, 2024

Great! You're welcome. I will keep this in mind and make it more resilient.

from phpagebuilder.

HansSchouten avatar HansSchouten commented on August 21, 2024

Awesome, glad to hear that!

from phpagebuilder.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.