Call to a member function isRedirection() on null - laravel-10

Just upgraded from Laravel 9 to Laravel 10. Everything looks good coding wise (I also used Laravel Shift), but now I get the following error:
Call to a member function isRedirection() on null
It then just shows me the index page for the error:
$response = $kernel->handle(
$request = Request::capture() //THIS IS WHAT IT HIGHLIGHTS WITH THE ISSUE
)->send();
Any ideas? The only thing I did was upgrade to Laravel 10 and run composer update, npm update, etc

Related

Timeout problem between 2 executions (In the Query Console) of Javascript function declared in a module

I defined the following module in the Modules database under '/test/test.mjs':
// test.mjs
export function test(message){
xdmp.log("Received: "+message);
return "Received: "+message;
}
I have the following code in the query console and I run it from a test database:
'use strict';
declareUpdate(); // I do not need here in this test case but I need it for my real code
import { test } from '/test/test.mjs';
test("Hello");
It is working fine the first time.
If I run it again, I am getting:
[javascript] XDMP-MODNOTFOUND: result: evalScriptOrModule(q) -- Module /test/test.mjs not found"
If I am waiting between 5 or 6 minutes and I run it again, it is working.
=> So it seems that a timeout is set somewhere when I am using a module inside the Query console (between 2 executions). Could you please give me an hint about it?
We solved the problem. It seems that it was coming from the configuration of the app server that we defined. Since we played also with it. The root was not equal to "/" anymore. We set it to "/" and now we do not have timeout problem between 2 executions.

Unable to alter table in using route in Laravel 8

I have a migration in Laravel 8 and already migrate. I was trying to alter the table and make nullable to one of the fields on that table.
I have run the following command
composer require doctrine/dbal
Here are the code I have in my web.php
Route::get('/update-column', function()
{
\Schema::table('kunjungan', function (Blueprint $table) {
$table->string('laporan')->nullable()->change();
});
});
When I tried to run that route from my browser, it ends up with the following error:
TypeError
Illuminate\Routing\RouteFileRegistrar::{closure}(): Argument #1 ($table) must be of type Blueprint, Illuminate\Database\Schema\Blueprint given, called in /Users/gmaramis/Documents/WebProjects/SiGER/SiGER-Kairos/vendor/laravel/framework/src/Illuminate/Database/Schema/Blueprint.php on line 95
What am I supposed to do to fix that error?
I am pretty newbie in Laravel
Thank you so much..
You are not importing the Blueprint class.
Add the following import to your file that's using Schema::table()
use Illuminate\Database\Schema\Blueprint;

Error with date when upgrading to Laravel 7

I have successfully upgraded my Laravel instance to version 7. So far everything seems fine apart from the following error.
Argument 1 passed to Carbon\CarbonInterval::setLocalTranslator() must
implement interface Symfony\Component\Translation\TranslatorInterface,
instance of Carbon\Translator given, called in
/var/www/laravel/vendor/nesbot/carbon/src/Carbon/Traits/Difference.php
I have followed the upgrade documentation and have added the following to my models (but still having the same problem).
protected function serializeDate(DateTimeInterface $date)
{
return $date->format('Y-m-d H:i:s');
}
I have the same error here on the linux server but not under wampp...
it is being triggered by the following command : $hist->created_at->diffForHumans()
I have tried the new serialization as well in the model :
use DateTimeInterface;
/**
* Prepare a date for array / JSON serialization.
*
* #param \DateTimeInterface $date
* #return string
*/
protected function serializeDate(DateTimeInterface $date)
{
return $date->format('Y-m-d H:i:s');
}
Found it... The migration is not going well it seems.
SO modify the composer.json to migrate to laravel 7 and symfony 5.
Then remove vendor folder and reinstall everything
composer clearcache
composer install
then it worked again.
This worked for me on Laravel V7
Delete this file /vendor/symfony/translation/TranslatorInterface.php
Then run this command to refresh the mapping: composer dump-autoload

Symfony website got broken once pushed in production

I'm developing a website using Symfony 3.2, and it worked perfectly well on my machine. It also worked perfectly well when I pushed it on our pre-production server. But then when I pushed it on our production server, it got broken.
The first problem I meet is this error, when trying to load a simple page using the News entity:
Error 500: Class 'Fidelise\SignUpBundle\Entity\News' does not exist
And yet that class definitely does exist.
The other problem is, when trying to log in to the website, I get this error:
500 - The request timed out.
Everything else works fine. Why would it start bugging when in production environment? I can also add some code if needed.
EDIT: here is the code of the call to the News class
/**
* Display the news page
*
* #return Response
*/
public function newsAction()
{
$repositoryNews = $this->getDoctrine()->getRepository('FideliseSignUpBundle:News');
$years = $repositoryNews->getYears();
$news = $repositoryNews->getAll();
return $this->render('#FOSUser/Security/news.html.twig', [
'years' => $years,
'news' => $news
]);
}

TYPO3 6.2 / Extension-Manager: "static_info_tables was requested to be downloaded in different versions"

i have a wired problem with TYPO3. We update a TYPO3 instance from TYPO3 4.7 to TYPO3 6.2.4. If we go to the Extension-Manager in the Backend its workling well. If i go to
Get Extensions on top the system loads a new list of Extensions.
Its running some minutes. After that in the box below i get the output No packages found.
If i click again on the Extension-Manager again. Its running 1 - 2 Minutes and i get the error:
Uncaught TYPO3 Exception
#1342432101: static_info_tables was requested to be downloaded in different versions. (More information)
TYPO3\CMS\Extensionmanager\Exception\ExtensionManagerException thrown in file
D:\www\xxxx\typo3\sysext\extensionmanager\Classes\Domain\Model\DownloadQueue.php in line 69.
I have checked that line.
if (array_key_exists($extension->getExtensionKey(), $this->extensionStorage[$stack])) {
if ($this->extensionStorage[$stack][$extension->getExtensionKey()] !== $extension) {
throw new \TYPO3\CMS\Extensionmanager\Exception\ExtensionManagerException(
$extension->getExtensionKey() . ' was requested to be downloaded in different versions.',
1342432101
);
}
}
If i comment the line the Extension-Manager load after a few minutes. Its very slow. Under Windows its not the fastest but normally its running.
If you output the Versions in the if statement then you get different versions static_info_tables 6.0.10 and static_info_tables 6.1.0 which is the correct one.
Does anybody know how to fix this problem? I can't use the Extension-Manager because its not loading and very very slow.
Ok after a few days we have found a solution. The extension table is corrupt after getting all new versions we have removed all old entries in the extension manager table and it was working well.
To solve the problem Find all entries in the tx_extensionmanager_domain_model_extension table for the extension key static_info_tables. After that you get some entries with different versions. We have removed all old entries that have made some trouble.
To find entries that make trouble you go to this line:
D:\www\xxxx\typo3\sysext\extensionmanager\Classes\Domain\Model\DownloadQueue.php in line 69.
And debug the if statement above. There you get the ids to remove.