Circular reference detected on TYPO3 11 backend login page - typo3

I have a weird error when trying to call the TYPO3 11 backend login page.
I updated from TYPO3 10 and can't login anymore.
I already removed all of my custom extensions, but the error persists and I can't make out where it comes from or why.
It seems to crash when reaching the first f:form.hidden field of the default login Fluid template.
As this is an obvious issue that probably would have got caught by core devs, I am pretty sure that this is correlated to a configuration of my instance, but as I said, this is to weird of an issue for me and I have no idea where to dig for the issue.
This is error message:
I can provide the whole stacktrace if needed.

Did you update your .htaccess file with the new rules for the TYPO3 backend? You can find a sample file in the the Resources folder of install tool extension: typo3/sysext/install/Resources/Private/FolderStructureTemplateFiles/root-htaccess
And I assume that you cleared all caches in the install tool and did a composer dump-autoload.

I discovered the source of this issue.
I had the following configuration automatically generated in my LocalConfiguration.php.
'SC_OPTIONS' => [
'GLOBAL' => [
'softRefParser' => [
'email' => 'TYPO3\\CMS\\Core\\Database\\SoftReferenceIndex',
'ext_fileref' => 'TYPO3\\CMS\\Core\\Database\\SoftReferenceIndex',
'notify' => 'TYPO3\\CMS\\Core\\Database\\SoftReferenceIndex',
'substitute' => 'TYPO3\\CMS\\Core\\Database\\SoftReferenceIndex',
'typolink' => 'TYPO3\\CMS\\Core\\Database\\SoftReferenceIndex',
'typolink_tag' => 'TYPO3\\CMS\\Core\\Database\\SoftReferenceIndex',
'url' => 'TYPO3\\CMS\\Core\\Database\\SoftReferenceIndex',
],
],
...
This caused the above error message. After removing this part from my configuration, the system lets me login and works flawlessly.

Related

Why I get 500 Error while on XAMPP while loading CodeIgniter 3 database library?

I have gone through number of threads on stackoverflow and on other forums to find the answer but could not find relevant answer. People have applied different approaches but none has worked for me thus far.
I am using CI 3 on XAMPP and whenever I load database library in the model, I run into 500 Error.
Here is my CI database config info:
'hostname' => 'localhost',
'username' => 'my_user',
'password' => 'my_pass',
'database' => 'prod_db',
'dbdriver' => 'mysqli',
'dbprefix' => '',
'pconnect' => FALSE,
PHP ini db libraries are as below:
extension=php_bz2.dll
extension=php_curl.dll
extension=php_fileinfo.dll
;extension=php_ftp.dll
extension=php_gd2.dll
extension=php_gettext.dll
;extension=php_gmp.dll
;extension=php_intl.dll
;extension=php_imap.dll
;extension=php_interbase.dll
;extension=php_ldap.dll
extension=php_mbstring.dll
extension=php_exif.dll ; Must be after mbstring as it depends on it
extension=php_mysqli.dll
;extension=php_oci8_12c.dll ; Use with Oracle Database 12c Instant Client
;extension=php_openssl.dll
;extension=php_pdo_firebird.dll
extension=php_pdo_mysql.dll
;extension=php_pdo_oci.dll
;extension=php_pdo_odbc.dll
;extension=php_pdo_pgsql.dll
extension=php_pdo_sqlite.dll
;extension=php_pgsql.dll
;extension=php_shmop.dll
; The MIBS data available in the PHP distribution must be installed.
; See http://www.php.net/manual/en/snmp.installation.php
;extension=php_snmp.dll
My model code is as below:
class loginmodel extends CI_Model {
public function validate_login($username, $password) {
$this->load->database();
$var = 0;
return $var;
}
}
Whenever I remove $this->load->database(); from the model, my code runs and i am able to redirect to a "Login Failed" page. BUT, whenever I load my database library in autoload.php or load it in above model, code fails.
Autoload.php
$autoload['libraries'] = array('database');
Apache error logs showed below errors but I could not figure as why this was happening.
PHP Warning: PHP Startup: Unable to load dynamic library 'C:\\php\\ext\\php_mysqli.dll' - The specified module could not be found.\r\n in Unknown on line 0
PHP Warning: PHP Startup: Unable to load dynamic library 'C:\\php\\ext\\php_pdo_mysql.dll' - The specified module could not be found.\r\n in Unknown on line 0
Please advise.
EDIT:
I verified all config to be OK and as stated in the comments, I added environment variables to windows and verified through PHPInfo that mysqli and mysqlnd were loaded.
Despite getting all the config right, error still persisted and I did a clean install of CI to reproduce library load failure. This time CI returned an error that db access was denied.
I then realized that after migration, database user was not created in the new environment. So once I created the desired user and assigned it required privileges, I was able to run the code just fine.
Therefore, if anyone encounters such issue in future, below steps might help:
First and foremost, verify if your desired user can access the
database.
Modify your .htaccess to use your desired URL schemes only after
verifying that database connection is working
Then verify that absolute path is available in PHP.ini on XAMPP.
Plus, verify that PHP is added in the environment variables. My
Values on Windows 10 are as follows: Variable Name: PHP , Variable
Value: C:\xampp\php\ext
In CI, mysqli is selected as database driver
In PHP.ini mysqli extension is enabled. i.e. php_mysqli.dll
Echo PHPInfo to verify that mysqli and mysqlnd are available in your
installation.
If nothing works, do a clean install of CI on a separate directory and load database library after setting up your database configuration and before setting up .htaccess until you can reproduce the error.
Hope that error will be eliminated!

Lumen with Socialite: The parameter app_id is required

I installed Laravel Socialite on Lumen 5.2, but can't make it work.
.ENV:
FB_KEY=xxx
FB_SECRET=xxx
FB_CALLBACK=http://lumen.app/auth/facebook/callback
app.php
class_alias('Laravel\Socialite\Facades\Socialite', 'Socialite');
$app->register(Laravel\Socialite\SocialiteServiceProvider::class);
config/services.php
return [
'facebook' => [
'client_id' => env('FB_KEY'),
'client_secret' => env('FB_SECRET'),
'redirect' => env('FB_CALLBACK'),
],
];
routes.php
$app->get('/auth/facebook', ['uses' => 'App\Http\Controllers\AuthController#redirectToProvider']);
$app->get('/auth/facebook/callback', ['uses' => 'App\Http\Controllers\AuthController#handleProviderCallback']);
AuthController.php
public function redirectToProvider()
{
Socialite::driver('facebook')->stateless()->redirect();
}
But when I open http://lumen.app/auth/facebook, it redirects me to FB page with an error The parameter app_id is required.
echo Socialite::driver('facebook')->stateless()->redirect()->getTargetUrl();
returns https://www.facebook.com/v2.6/dialog/oauth?scope=email&response_type=code
This URL doesn't have client credentials, and I don't know why.
Had the same problem, after debugging got that config/services.php was not picked (I use lumen 5.4)
So just add in your bootstrap/app.php line $app->configure('services');
Cheers!
It's reading from the compiled cache. Just run:
php artisan optimize
I found a solution for me on Laravel 5.5:
php composer installs socialite framework 3.0 by default, but for version 3.0 there is no documentations. I then removed the folder socialite from vendor/laravel/ and installed socialite 2.0.21 which gave me the error:
Undefined method Illuminate\session\store::set()
Just replace set with put.
I found the solution for this problem here: a session error after updating to laravel 5.4

Yii2 Module setup in advanced template

I have created a module in frontend folder path is frontend/modules/module-name/Module.php. I am getting ReflectionException error as Class app\modules\module-name\Module does not exist. In frontend/config/main.php i have added this configuration
'modules' => [
'module-name' => [
'class' => 'app\modules\module-name\Module'
]
Can anyone help why i am getting this ReflectionException error
You said that you are using an advanced template, folder path is frontend/modules/module-name/Module.php, but you are requiring app\modules\module-name\Module class. It looks like a namespace from basic application template.
In case of advanced template, make sure that Module.php file is in frontend/modules/module-name folder, has a namespace frontend\modules\module-name and you are requiring frontend\modules\module-name\Module class.

Fatal error: Class 'PEAR' not found in /home/user1/public_html/go-pear.php on line 697

When trying to install PEAR by running go-pear.php (from the root of a cPanel GoDaddy hosted account), I get the following error:
Starting installation ... Loading zlib: ok
Bootstrapping Installer...................
Bootstrapping PEAR5.php............(remote) ok
Bootstrapping PEAR.php............(remote) ok
Bootstrapping Archive/Tar.php............(remote) ok
Bootstrapping Console/Getopt.php............(remote) ok
Fatal error: Class 'PEAR' not found in /home/alessio1/public_html/go-pear.php on line 697
line 697 is the following: PEAR::setErrorHandling(PEAR_ERROR_DIE,
"\n%s\n");
The file go-pear.php was taken directly from http://pear.php.net/go-pear without any modification.
What am I doing wrong?
I had the same error, and managed to solve it replacing the links stored in $bootstrap_files to :
$bootstrap_files = array(
'PEAR5.php' => 'https://raw.githubusercontent.com/pear/pear-core/master/PEAR5.php',
'PEAR.php' => 'https://raw.githubusercontent.com/pear/pear-core/master/PEAR.php',
'Archive/Tar.php' => 'https://raw.githubusercontent.com/pear/Archive_Tar/master/Archive/Tar.php',
'Console/Getopt.php' => 'https://raw.githubusercontent.com/pear/Console_Getopt/master/Console/Getopt.php',
);
I also had this error and found that KevinD's fix didn't work for me, but was able to figure something out based on it. To solve the problem I replaced the line
'Console/Getopt.php' => 'https://raw.github.com/pear/Console_Getopt/trunk/Console/Getopt.php',
with
'Console/Getopt.php' => 'https://raw.githubusercontent.com/pear/Console_Getopt/trunk/Console/Getopt.php',
The install completed nearly instantly for me after this change.
Use the .phar file: http://pear.php.net/go-pear.phar
It should work better.
Pay attenction: Sometimes the problem is caused because of the blocking of fsocket() php function.
Server-to-server communication is sometimes used to commit abuses for example internet attacks.
Many free hosting companies block fsocket() function by default, and sometimes you have to authenticate yourself (providing information about you) to use this function.

Another facebook Fatal error: Uncaught CurlException

I am using latest base_facebook.php https://github.com/facebook/facebook-php-sdk/blob/master/src/base_facebook.php in order to authenticate the user to my web application via facebook.
Everything was working fine until today. I am getting suddenly a message in my web application like this
Fatal error: Uncaught CurlException: 7: Failed to connect to
2a03:2880:10:6f01:face:b00c:0:8: Network is unreachable thrown in
/var/www/pygmaxia2.gr/templates/pygmaxia2gr/base_facebook.php on line
977
Yesterday I was working normally and today all day long with no problem. The problem seemed to apear when I deleted a folder that I didn't need and was totally irrelevant with the file. When I do ctrl F5 for refresh with firefox, the message disappears and everything seems to work. But after a while It appears again just by clicking around in the page.
I have seen many have this problem but in my case there is no solution yet. The problem appears and disappears by itself without something visible causing it. I also need to mention that I am on a ubuntu 12.04 system and today I did an update. Do you think that it would disrupt the ipv6 related files? But still why is it going away periodically and then reappearing again? Also there is no firewall in my System.
Thank you
It seems that Facebook is down now in several country for more than an hour.... Just wait !
I'm having the exact same problem at the very moment, and it seems to me I can't connect to developers.facebook.com altogether.
Set Proxy To Connect Facebook.com
## Find Code In base_facebook.php ##
public static $CURL_OPTS = array(
CURLOPT_CONNECTTIMEOUT => 10,
CURLOPT_RETURNTRANSFER => true,
CURLOPT_TIMEOUT => 60,
CURLOPT_USERAGENT => 'facebook-php-3.2',
);
And Add option
public static $CURL_OPTS = array(
CURLOPT_CONNECTTIMEOUT => 10,
CURLOPT_RETURNTRANSFER => true,
CURLOPT_TIMEOUT => 60,
CURLOPT_USERAGENT => 'facebook-php-3.2',
CURLOPT_PROXY => '199.200.120.140:8089',
);
I encountered a similar curl exception since it was attempting to use IPv6 but was unable to.
Could get it working after I forced curl to use IPv4 via curl_setopt(). Followed the suggestion in this link - http://www.tech-and-dev.com/2012/07/how-to-fix-facebook-connect-error.html