Comments (10)
Thanks for the suggestion. However, PHPageBuilder should be able to work without Laravel so the request()
helper cannot be added there. I will look into it. Any idea why $_SERVER['REQUEST_URI']
is not defined? Are you running some script via command line?
from laravel-pagebuilder.
Also doesn't work with Laravel 8. The installation workflow also throws several errors.
from laravel-pagebuilder.
I get an error when running the command to create the theme. I think $_SERVER['SERVER_NAME'], $_SERVER['REQUEST_URI'] global variable is only accessible when running application through a browser. It will through an error when run php-cli.
from laravel-pagebuilder.
Ah ok, in that case it makes at least sense why it is happing. I will fix it asap.
from laravel-pagebuilder.
same error, but it happens when i try to open the pagebuilder, white page and same error
laravel 7
php 7.4
ubuntu 18.04
from laravel-pagebuilder.
I'm not really firm with PHP and Laravel but the first issues i could solve, as it is described here: #41
But then it ended up with this errors (with Laravel 8) on my local machine (Ubuntu 20.04):
composer require hansschouten/laravel-pagebuilder
Using version ^0.13.0 for hansschouten/laravel-pagebuilder
./composer.json has been updated
Loading composer repositories with package information
Updating dependencies (including require-dev)
Nothing to install or update
Generating optimized autoload files
> Illuminate\Foundation\ComposerScripts::postAutoloadDump
> @php artisan package:discover --ansi
ErrorException
Undefined index: SERVER_NAME
at vendor/hansschouten/phpagebuilder/src/Core/helpers.php:247
243▕ $port = '';
244▕ if (isset($_SERVER['SERVER_PORT']) && ! in_array($_SERVER['SERVER_PORT'], [80, 443])) {
245▕ $port = ":" . $_SERVER['SERVER_PORT'];
246▕ }
➜ 247▕ $currentFullUrl = $protocol . "://" . $_SERVER['SERVER_NAME'] . $port . urldecode($_SERVER['REQUEST_URI']);
248▕ $currentFullUrl = rtrim($currentFullUrl, '/' . DIRECTORY_SEPARATOR);
249▕ return $currentFullUrl;
250▕ }
251▕ }
+18 vendor frames
19 [internal]:0
Illuminate\Foundation\Application::Illuminate\Foundation\{closure}()
+5 vendor frames
25 artisan:37
Illuminate\Foundation\Console\Kernel::handle()
Script @php artisan package:discover --ansi handling the post-autoload-dump event returned with error code 1
Installation failed, reverting ./composer.json to its original content.
from laravel-pagebuilder.
Error: Undefined index: REQUEST_URI and Undefined index: SERVER_NAME in hansschouten\phpagebuilder\src\Core\helpers.php line 247
I changed line 247 to $currentFullUrl = $protocol . "://" . request()->server('SERVER_NAME') . $port . urldecode(request()->server('REQUEST_URI')); and it work
- Laravel 6
- PHP 7.3
- centOS 7
Also worked for me
from laravel-pagebuilder.
Same error : ErrorException Undefined index: SERVER_NAME
`
243| $port = '';
244| if (isset($_SERVER['SERVER_PORT']) && ! in_array($_SERVER['SERVER_PORT'], [80, 443])) {
245| $port = ":" . $_SERVER['SERVER_PORT'];
246| }
247| $currentFullUrl = $protocol . "://" . $_SERVER['SERVER_NAME'] . $port . urldecode($_SERVER['REQUEST_URI']);
248| $currentFullUrl = rtrim($currentFullUrl, '/' . DIRECTORY_SEPARATOR);
249| return $currentFullUrl;
250| }
251| }
`
from laravel-pagebuilder.
fresh install gives me this error
$:/var/www/html/current# composer require hansschouten/laravel-pagebuilder
Warning from https://repo.packagist.org: You are using an outdated version of Composer. Composer 2.0 is now available and you should upgrade. See https://getcomposer.org/2
Using version ^0.14.0 for hansschouten/laravel-pagebuilder
./composer.json has been updated
Loading composer repositories with package information
Warning from https://repo.packagist.org: You are using an outdated version of Composer. Composer 2.0 is now available and you should upgrade. See https://getcomposer.org/2
Updating dependencies (including require-dev)
Fatal error: Allowed memory size of 1610612736 bytes exhausted (tried to allocate 4096 bytes) in phar:///usr/local/bin/composer/src/Composer/DependencyResolver/Solver.php on line 223
it is a 1.6 GB for a second
next composer update gives another error
> Illuminate\Foundation\ComposerScripts::postAutoloadDump
> @php artisan package:discover
In helpers.php line 247:
Undefined index: SERVER_NAME
Script @php artisan package:discover handling the post-autoload-dump event returned with error code 1
patching helpers.php
$currentFullUrl = $protocol . "://" . (isset($_SERVER['SERVER_NAME']) ? $_SERVER['SERVER_NAME'] : '') . $port . urldecode(isset($_SERVER['REQUEST_URI']) ? $_SERVER['REQUEST_URI'] : '');
gives another
Generating autoload files
> Illuminate\Foundation\ComposerScripts::postAutoloadDump
> @php artisan package:discover
In helpers.php line 432:
Class name must be a valid object or a string
Script @php artisan package:discover handling the post-autoload-dump event returned with error code 1
from laravel-pagebuilder.
Hi everyone, this issue has just been fixed in v0.15.0. Please upgrade your environment.
from laravel-pagebuilder.
Related Issues (20)
- Migration Error HOT 5
- Can't run php artisan migrate HOT 3
- unable to add bullets in PB editor HOT 1
- Error when run migrate in laravel 8 in version phpbuildier 0.22.0
- pagebuilder HOT 1
- Migration error [Laravel 8.8, pagebuilder 0.24] HOT 3
- database mess
- You pushed Laravel library 3 years ago. Do you believe, this library will work on Laravel 10? HOT 3
- SQLSTATE[42S22]: Column not found: 1054 Unknown column 'meta_title' in 'field list' HOT 2
- How can I get Grapejs default block components inside my block HOT 2
- Tutorial about integrating PHPageBuilder into a Laravel project HOT 1
- Call to a member function select() on null Error
- Cannot drag & drop, white screen with nothing to do HOT 2
- No publishable resources for tag [config]. HOT 6
- No publishable resources for tag [config] HOT 2
- Issue on block separation using tailwind CSS HOT 2
- /admin not found, but records url as /in
- Admin Login returns 419 Expired
- incompatibility with laravel 10 and 11
- how do i implement this app with already having admin route and lots of users.
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from laravel-pagebuilder.