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

Call to undefined method TYPO3\CMS\v76\Install\Updates\WorkspacesNotificationSettingsUpdate::getDatabaseConnection() #1

Open
wowaTYPO3 opened this issue Jun 15, 2023 · 3 comments

Comments

@wowaTYPO3
Copy link

wowaTYPO3 commented Jun 15, 2023

Hi,

I wanted to test the extension now when upgrading from TYPO3 8 to 12.

My procedure:

  1. fresh TYPO3 12.4.2 installed via composer
  2. imported database from v8
  3. database compare done, new and changed fields (nothing deleted)
  4. started upgrade wizards

This then aborts directly with the following message:

(1/1) Error
Call to undefined method TYPO3\CMS\v76\Install\Updates\WorkspacesNotificationSettingsUpdate::getDatabaseConnection()

in /var/www/html/vendor/wapplersystems/core-upgrader/Classes/Updates/v76/WorkspacesNotificationSettingsUpdate.php line 75
            return false;
        }


        $workspacesCount = $this->getDatabaseConnection()->exec_SELECTcountRows(
            'uid',
            'sys_workspace',
            'deleted=0'
        );
at TYPO3\CMS\v76\Install\Updates\WorkspacesNotificationSettingsUpdate->updateNecessary()
in /var/www/html/vendor/typo3/cms-install/Classes/Service/UpgradeWizardsService.php line 171
        return [
            'class' => $wizard::class,
            'identifier' => $identifier,
            'title' => $wizard->getTitle(),
            'shouldRenderWizard' => $wizard->updateNecessary(),
            'explanation' => $wizard->getDescription(),
        ];
    }

at TYPO3\CMS\Install\Service\UpgradeWizardsService->getWizardInformationByIdentifier('workspacesNotificationSettingsUpdate')
in /var/www/html/vendor/typo3/cms-install/Classes/Service/UpgradeWizardsService.php line 154
            if ($this->isWizardDone($identifier)) {
                continue;
            }

            $wizards[] = $this->getWizardInformationByIdentifier($identifier);
        }
        return $wizards;
    }

at TYPO3\CMS\Install\Service\UpgradeWizardsService->getUpgradeWizardsList()
in /var/www/html/vendor/typo3/cms-install/Classes/Controller/UpgradeController.php line 1130
    public function upgradeWizardsListAction(): ResponseInterface
    {
        // ext_localconf, db and ext_tables must be loaded for the updates :(
        $container = $this->lateBootService->loadExtLocalconfDatabaseAndExtTables(false);
        $wizards = $container->get(UpgradeWizardsService::class)->getUpgradeWizardsList();
        $this->lateBootService->resetGlobalContainer();
        return new JsonResponse([
            'success' => true,
            'status' => [],
at TYPO3\CMS\Install\Controller\UpgradeController->upgradeWizardsListAction(object(TYPO3\CMS\Core\Http\ServerRequest))
in /var/www/html/vendor/typo3/cms-install/Classes/Middleware/Maintenance.php line 231
                    'Unknown action method ' . $action . ' in controller ' . $controllerName,
                    1505216027
                );
            }
            $response = $controller->$action($request);
        }

        return $response;
    }
at TYPO3\CMS\Install\Middleware\Maintenance->process(object(TYPO3\CMS\Core\Http\ServerRequest), object(Psr\Http\Server\RequestHandlerInterface@anonymous/var/www/html/vendor/typo3/cms-core/Classes/Http/MiddlewareDispatcher.php:128$a6))
in /var/www/html/vendor/typo3/cms-core/Classes/Http/MiddlewareDispatcher.php line 111
            }

            public function handle(ServerRequestInterface $request): ResponseInterface
            {
                return $this->middleware->process($request, $this->next);
            }
        };
    }

at Psr\Http\Server\RequestHandlerInterface@anonymous/var/www/html/vendor/typo3/cms-core/Classes/Http/MiddlewareDispatcher.php:93$a5->handle(object(TYPO3\CMS\Core\Http\ServerRequest))
in /var/www/html/vendor/typo3/cms-core/Classes/Middleware/NormalizedParamsAttribute.php line 41
     */
    public function process(ServerRequestInterface $request, RequestHandlerInterface $handler): ResponseInterface
    {
        $request = $request->withAttribute('normalizedParams', NormalizedParams::createFromRequest($request));
        return $handler->handle($request);
    }
}
at TYPO3\CMS\Core\Middleware\NormalizedParamsAttribute->process(object(TYPO3\CMS\Core\Http\ServerRequest), object(Psr\Http\Server\RequestHandlerInterface@anonymous/var/www/html/vendor/typo3/cms-core/Classes/Http/MiddlewareDispatcher.php:93$a5))
in /var/www/html/vendor/typo3/cms-core/Classes/Http/MiddlewareDispatcher.php line 162

                if (!$middleware instanceof MiddlewareInterface) {
                    throw new \InvalidArgumentException(get_class($middleware) . ' does not implement ' . MiddlewareInterface::class, 1516821342);
                }
                return $middleware->process($request, $this->next);
            }
        };
    }
}
at Psr\Http\Server\RequestHandlerInterface@anonymous/var/www/html/vendor/typo3/cms-core/Classes/Http/MiddlewareDispatcher.php:128$a6->handle(object(TYPO3\CMS\Core\Http\ServerRequest))
in /var/www/html/vendor/typo3/cms-core/Classes/Http/MiddlewareDispatcher.php line 70
     * Invoke the middleware stack
     */
    public function handle(ServerRequestInterface $request): ResponseInterface
    {
        return $this->tip->handle($request);
    }

    /**
     * Seed the middleware stack with the inner request handler
at TYPO3\CMS\Core\Http\MiddlewareDispatcher->handle(object(TYPO3\CMS\Core\Http\ServerRequest))
in /var/www/html/vendor/typo3/cms-core/Classes/Http/AbstractApplication.php line 80

    public function handle(ServerRequestInterface $request): ResponseInterface
    {
        try {
            $response = $this->requestHandler->handle($request);
        } catch (ImmediateResponseException $exception) {
            $response = $exception->getResponse();
        }
        return $response;
at TYPO3\CMS\Core\Http\AbstractApplication->handle(object(TYPO3\CMS\Core\Http\ServerRequest))
in /var/www/html/vendor/typo3/cms-install/Classes/Http/Application.php line 46
    public function handle(ServerRequestInterface $request): ResponseInterface
    {
        $this->initializeContext();
        $request = $request->withAttribute('applicationType', SystemEnvironmentBuilder::REQUESTTYPE_INSTALL);
        return parent::handle($request)
            ->withHeader('X-Frame-Options', 'SAMEORIGIN');
    }

    /**
at TYPO3\CMS\Install\Http\Application->handle(object(TYPO3\CMS\Core\Http\ServerRequest))
in /var/www/html/vendor/typo3/cms-core/Classes/Http/AbstractApplication.php line 92
     * Set up the application and shut it down afterwards
     */
    final public function run()
    {
        $response = $this->handle(ServerRequestFactory::fromGlobals());
        $this->sendResponse($response);
    }
}
at TYPO3\CMS\Core\Http\AbstractApplication->run()
in /var/www/html/public/typo3/install.php line 19

call_user_func(static function () {
    $classLoader = require dirname(dirname(__DIR__)).'/vendor/autoload.php';
    \TYPO3\CMS\Core\Core\SystemEnvironmentBuilder::run(1, \TYPO3\CMS\Core\Core\SystemEnvironmentBuilder::REQUESTTYPE_INSTALL);
    \TYPO3\CMS\Core\Core\Bootstrap::init($classLoader, true)->get(\TYPO3\CMS\Install\Http\Application::class)->run();
});
at {closure}()
in /var/www/html/public/typo3/install.php line 20
call_user_func(static function () {
    $classLoader = require dirname(dirname(__DIR__)).'/vendor/autoload.php';
    \TYPO3\CMS\Core\Core\SystemEnvironmentBuilder::run(1, \TYPO3\CMS\Core\Core\SystemEnvironmentBuilder::REQUESTTYPE_INSTALL);
    \TYPO3\CMS\Core\Core\Bootstrap::init($classLoader, true)->get(\TYPO3\CMS\Install\Http\Application::class)->run();
});
@svewap
Copy link
Contributor

svewap commented Jun 15, 2023

Ok, vielen Dank. Den Feedback brauche ich, weil ich nicht alle Fälle bei mir habe. Ich schaue es mir an.

@svewap
Copy link
Contributor

svewap commented Jun 15, 2023

Falls die die core ext "workspaces" nicht benötigst, kannst du das Problem übrigens umgehen indem du diese rauslässt. Aber das nur als Notfall-Workaround. Da ist noch alter Code drin, den ich konvertieren muss.

@wowaTYPO3
Copy link
Author

Okay, removing the workspaces extension helped. Thanks :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants