typo3 backend does not parse: syntax error, unexpected 'class' (T_CLASS) - typo3

I just installed Yet Another Gallery 4.0.7 on Typo3 6.2.19. When I try to open backend module I only get this error:
Parse error: syntax error, unexpected 'class' (T_CLASS), expecting identifier (T_STRING) or variable (T_VARIABLE) or '{' or '$' in /var/www/clients/client6/web32/web/typo3conf/ext/pt_extlist/Classes/Domain/Configuration/Filters/FilterConfig.php on line 351
Screenshot:

The error is coming from the extension "List Generator". The code uses the Class::class syntax which is probably not supported by your version of PHP. Check if you are running PHP 5.5 or higher.

You should try to call class like: 'Vendor\YourController\Task\Yourclass', instead of \Vender\YourController\Task\YourClass::class

Related

FPDI-2.3.6 "Fatal error: Uncaught Error: Class "FPDI" not found" (2021)

I download and uncompress FPDF 1.83 and FPDI 2.3.6, after I load correctlly with:
<?php
require_once('fpdf183/fpdf.php');
require_once('FPDI-2.3.6/src/autoload.php');
but when I try use:
<?php
require_once('fpdf183/fpdf.php');
require_once('FPDI-2.3.6/src/autoload.php');
$pdf = new FPDI();
Fatal error: Uncaught Error: Class "FPDI" not found ... on line 5
how I can fixed that?, how I can use ALL functions FPDI and FPDF without use composer ?
You need use additional line: use setasign\Fpdi\Fpdi;
<?php
require_once('fpdf183/fpdf.php');
require_once('FPDI-2.3.6/src/autoload.php');
use setasign\Fpdi\Fpdi;
However opening PDFs with PDFI in 2021 maybe you get:
Alternatively the document you're trying to import has to be resaved without the use of compressed cross-reference streams and objects by an external programm (e.g. by lowering the PDF version to 1.4).
Then setasign.com reply: We offer a commercial addon which enables FPDI to handle documents that uses these compression features. :#
https://www.setasign.com/support/faq/fpdi/error-document-compression-technique-not-supported/

How to add Babel support for nullishCoalescingOperator to vue project?

In my Vue-CLI project, when I tried using the ?? operator, I got this error:
Syntax Error: SyntaxError: /Users/stevebennett/odev/freelancing/v-map/src/components/Map.vue: >Support for the experimental syntax 'nullishCoalescingOperator' isn't currently enabled (30:29):
...
Add #babel/plugin-proposal-nullish-coalescing-operator (https://git.io/vb4Se) to the 'plugins' section of your Babel config to enable transformation.
I installed #babel/plugin-syntax-nullish-coalescing-operator (its name seems to have changed), added it to my babel.config.js:
module.exports = {
presets: ['#vue/app'],
plugins: ['#babel/plugin-syntax-nullish-coalescing-operator'],
};
Now the error message seems to have gone backwards, no reference to the operator name at all:
Module parse failed: Unexpected token (39:35)
You may need an appropriate loader to handle this file type.
| case 8:
| points = _context.sent;
console.log(sheetID ?? 37);
What am I doing wrong?
For me, the #babel/plugin-syntax-nullish-coalescing-operator plugin would not work, which is the one you are using.
I had to use the #babel/plugin-proposal-nullish-coalescing-operator plugin which is the one that the error message suggests you use.
Additionally, I noticed this on the page for the #babel/plugin-syntax-nullish-coalescing-operator plugin:
I can't say for sure if this will fix your problem, but it certainly fixed mine

TYPO3 v10.1.0 won't install

I just wanted to install TYPO3 10.1.0, but the installation doesn't work.
At first, it throws an Server-500-error, without any php-errors.
After setting'displayErrors' => true I could see a detailed error message showing
Symfony\Component\DependencyInjection\Exception\InvalidArgumentException
The file "/var/www/html/typo3/public/typo3/sysext/core/Configuration//Services.yaml" does not contain valid YAML: Unexpected characters near "
I opend that file, and removed all comments inside it, and reloaded the install.php, which resolved that error, but another error was thrown, this time in my php-output:
NOTICE: PHP message: PHP Fatal error: Class TYPO3\CMS\Core\Mail\FileSpool contains 1 abstract method and must therefore be declared abstract or implement the remaining methods (Symfony\Component\Mailer\Transport\TransportInterface::__toString) in /var/www/html/typo3/public/typo3/sysext/core/Classes/Mail/FileSpool.php on line 38
After I added the __toString():string function in FileSpool.php, I get another error
NOTICE: PHP message: PHP Fatal error: Declaration of TYPO3\CMS\Core\Mail\Mailer::send(Symfony\Component\Mime\RawMessage $message, ?Symfony\Component\Mailer\SmtpEnvelope $envelope = NULL): void must be compatible with Symfony\Component\Mailer\MailerInterface::send(Symfony\Component\Mime\RawMessage $message, ?Symfony\Component\Mailer\Envelope $envelope = NULL): void in /var/www/html/typo3/public/typo3/sysext/core/Classes/Mail/Mailer.php on line 38
So, basically, the core/classes/Mail prevent me from installing TYPO3 10.1.0
This is a known problem caused by changes in Symfony version 4.4 components and is solved in current master or version 10.2.0 (release scheduled for tomorrow, December 3rd) see corresponding patch.
You currently have four options to circumvent this issue:
wait for the new release of tomorrow
use current master instead of 10.1
apply the patch to your installation
add the following lines to your composer.json
"conflict": {
"symfony/config": "~4.4.0",
"symfony/console": "~4.4.0",
"symfony/dependency-injection": "~4.4.0",
"symfony/expression-language": "~4.4.0",
"symfony/finder": "~4.4.0",
"symfony/mailer": "~4.4.0",
"symfony/mime": "~4.4.0",
"symfony/property-access": "~4.4.0",
"symfony/property-info": "~4.4.0",
"symfony/routing": "~4.4.0",
"symfony/yaml": "~4.4.0"
}

FOSFacebookBundle - FacebookSessionPersistence - Fatal error: Class 'BaseFacebook' not found

I'm using FOSFacebookBundle on symfony2.
I would like to create an object from FacebookSessionPersistence to read facebook User Informations.
But i have the following error:
Fatal error: Class 'BaseFacebook' not found in C:\Users\gp\Desktop\xampp\htdocs\projectOne\p1\vendor\bundles\FOS\FacebookBundle\Facebook\FacebookSessionPersistence.php on line 13
I registered the bundle and the autoloader like in the installation document.
Has anybody an idea what I'm doing wrong?
Thanks
1.) are you sure you have facebook sdk also installed?
[FacebookSDK]
git=git://github.com/facebook/php-sdk.git
target=/facebook
2.) Are you sure you have config set?
fos_facebook:
file: %kernel.root_dir%/../vendor/facebook/src/base_facebook.php
Check your autoload_classmap.php file, it should contain something like this
'BaseFacebook' => $vendorDir . '/facebook/php-sdk/src/base_facebook.php',
'Facebook' => $vendorDir . '/facebook/php-sdk/src/facebook.php',
'FacebookApiException' => $vendorDir . '/facebook/php-sdk/src/base_facebook.php',
if you installed the "facebook/php-sdk" with composer, it should be done automatically.

wurfl2 integration in TYPO3

everytime i try to install the wurfl2 extension in TYPO3 i get the following error message:
Fatal error: require_once() [function.require]: Failed opening required '' (include_path='.:/usr/local/php/lib/php:/usr/local/php/lib/php/PEAR') in /html/typo3conf/temp_CACHED_ps9b8e_ext_localconf.php on line 501
is anyone familiar with this error and knows how to fix it?
I get the same error message with TYPO3 4.4.4. I had to remove the extension folder and to delete all ./typo3conf/temp* files to get Typo3 running again afterwards.
(You might not see the error message if you don't have something like $TYPO3_CONF_VARS['SYS']['displayErrors'] = '1' in your localconf.php. You can set this with the installtool.
As already mentioned by the other answer first you have to get your system running again: set $TYPO3_CONF_VARS['SYS']['displayErrors'] = '1' in your localconf.php in order to see all error messages. Afterwards remove the extension folder.
I think the error is caused by a missing config file. The extension constant wurflConfig has to be set with the absolute path to the file /YOUR/PATH/TO/WEB_DIR/typo3conf/ext/wurfl2/res1/li/wurfl_config.php and might have to adjust the settings there.