Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix ($content) must be of type Stringable|string, null given #50

Closed
wvro-org opened this issue Dec 28, 2023 · 8 comments
Closed

Fix ($content) must be of type Stringable|string, null given #50

wvro-org opened this issue Dec 28, 2023 · 8 comments
Assignees
Labels
Control panel question Further information is requested

Comments

@wvro-org
Copy link
Contributor

wvro-org commented Dec 28, 2023

Testing Namingo on mac os on Astra Linux via Parallels....
Found this issue when creating and or checking domain....

Screenshot 2023-12-29 at 00 05 35 `Slim Application Error The application could not run because of the following error:

Details
Type: TypeError
Code: 0
Message: Pdp\TopLevelDomains::fromString(): Argument #1 ($content) must be of type Stringable|string, null given, called in /var/www/cp/bootstrap/helper.php on line 306
File: /var/www/cp/vendor/jeremykendall/php-domain-parser/src/TopLevelDomains.php
Line: 50
Trace
#0 /var/www/cp/bootstrap/helper.php(306): Pdp\TopLevelDomains::fromString()
#1 /var/www/cp/app/Controllers/DomainsController.php(28): extractDomainAndTLD()
#2 /var/www/cp/vendor/slim/slim/Slim/Handlers/Strategies/RequestResponseArgs.php(36): App\Controllers\DomainsController->checkDomain()
#3 /var/www/cp/vendor/slim/slim/Slim/Routing/Route.php(358): Slim\Handlers\Strategies\RequestResponseArgs->__invoke()
#4 /var/www/cp/vendor/slim/slim/Slim/MiddlewareDispatcher.php(65): Slim\Routing\Route->handle()
#5 /var/www/cp/app/Middleware/AuthMiddleware.php(21): Slim\MiddlewareDispatcher->handle()
#6 /var/www/cp/vendor/slim/slim/Slim/MiddlewareDispatcher.php(269): App\Middleware\AuthMiddleware->__invoke()
#7 /var/www/cp/vendor/slim/slim/Slim/MiddlewareDispatcher.php(65): Psr\Http\Server\RequestHandlerInterface@anonymous->handle()
#8 /var/www/cp/vendor/slim/slim/Slim/Routing/Route.php(315): Slim\MiddlewareDispatcher->handle()
#9 /var/www/cp/vendor/slim/slim/Slim/Routing/RouteRunner.php(68): Slim\Routing\Route->run()
#10 /var/www/cp/vendor/slim/twig-view/src/TwigMiddleware.php(115): Slim\Routing\RouteRunner->handle()
#11 /var/www/cp/vendor/slim/slim/Slim/MiddlewareDispatcher.php(121): Slim\Views\TwigMiddleware->process()
#12 /var/www/cp/app/Middleware/ValidationErrorsMiddleware.php(19): Psr\Http\Server\RequestHandlerInterface@anonymous->handle()
#13 /var/www/cp/vendor/slim/slim/Slim/MiddlewareDispatcher.php(269): App\Middleware\ValidationErrorsMiddleware->__invoke()
#14 /var/www/cp/app/Middleware/OldInputMiddleware.php(18): Psr\Http\Server\RequestHandlerInterface@anonymous->handle()
#15 /var/www/cp/vendor/slim/slim/Slim/MiddlewareDispatcher.php(269): App\Middleware\OldInputMiddleware->__invoke()
#16 /var/www/cp/app/Middleware/CsrfViewMiddleware.php(26): Psr\Http\Server\RequestHandlerInterface@anonymous->handle()
#17 /var/www/cp/vendor/slim/slim/Slim/MiddlewareDispatcher.php(269): App\Middleware\CsrfViewMiddleware->__invoke()
#18 /var/www/cp/vendor/slim/csrf/src/Guard.php(476): Psr\Http\Server\RequestHandlerInterface@anonymous->handle()
#19 /var/www/cp/bootstrap/app.php(224): Slim\Csrf\Guard->process()
#20 /var/www/cp/vendor/slim/slim/Slim/MiddlewareDispatcher.php(269): Closure->{closure}()
#21 /var/www/cp/routes/web.php(257): Psr\Http\Server\RequestHandlerInterface@anonymous->handle()
#22 /var/www/cp/vendor/slim/slim/Slim/MiddlewareDispatcher.php(269): Closure->{closure}()
#23 /var/www/cp/vendor/slim/slim/Slim/Middleware/ErrorMiddleware.php(76): Psr\Http\Server\RequestHandlerInterface@anonymous->handle()
#24 /var/www/cp/vendor/slim/slim/Slim/MiddlewareDispatcher.php(121): Slim\Middleware\ErrorMiddleware->process()
#25 /var/www/cp/vendor/slim/slim/Slim/MiddlewareDispatcher.php(65): Psr\Http\Server\RequestHandlerInterface@anonymous->handle()
#26 /var/www/cp/vendor/slim/slim/Slim/App.php(199): Slim\MiddlewareDispatcher->handle()
#27 /var/www/cp/vendor/slim/slim/Slim/App.php(183): Slim\App->handle()
#28 /var/www/cp/public/index.php(5): Slim\App->run()
#29 {main}
Go Back`

@getpinga
Copy link
Contributor

getpinga commented Dec 29, 2023

Thanks. This seems to me like an undocumented step. Does it get fixed if you do:

cd /var/www/cp/bin
php file_cache.php

@wvro-org
Copy link
Contributor Author

wvro-org commented Dec 29, 2023

Yes that's fixed it... however when creating and or checking domain there's another errror...
For example
TLDs:
.test
.example.example.

Checking domain test.test is not available: Zone is not supported
Checking domain test.example.example is not available: Zone is not supported
it's show the same error even if you loged in admin or to registrar Example Registrar

@getpinga
Copy link
Contributor

Try to create a contact and a host and let me know if all is ok there.
If yes, we will debug the domain creation.

@getpinga
Copy link
Contributor

Also, is the TLD you are trying to check domain in ,added to Registry -> TLDs menu? .test gets added by default, so if database import went well, should work.

@wvro-org
Copy link
Contributor Author

Somehow it works only with .test tld it refuses to work even with .example tld.... so newly added tlds aren't working...
Ofcourse TLDs are added to Registry -> TLDs menu...
contact and hosts created to....

@getpinga
Copy link
Contributor

Ok, I see now the issue, thanks. It should work as .test and .xx TLDs as example TLDs, all the rest it validates against ICANN lists. So .example will not work.

Please test for now with .test and .xx, and in the next few days I'll add ability to skip ICANN validation.

@getpinga
Copy link
Contributor

If you need to add more test TLDs now, check #33 and you will see which file needs to be modified.

@getpinga getpinga self-assigned this Dec 29, 2023
@getpinga getpinga added bug Something isn't working Control panel labels Dec 29, 2023
getpinga added a commit that referenced this issue Dec 29, 2023
@getpinga getpinga added question Further information is requested and removed bug Something isn't working labels Dec 29, 2023
@getpinga
Copy link
Contributor

Instruction to cache the initial TLD list added to the manual. Also added ability in the last commit to determine the test TLDs from config files.

If you experience further issues, please let me know.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Control panel question Further information is requested
Projects
None yet
Development

No branches or pull requests

2 participants