you need to migrate Composer to version 2
Показаны сообщения с ярлыком error. Показать все сообщения
Показаны сообщения с ярлыком error. Показать все сообщения
понедельник, 10 января 2022 г.
вторник, 17 декабря 2019 г.
[Android] admob invalid application id fix
If you tried everything from https://developers.google.com/admob/android/quick-start#update_your_androidmanifestxml and still doesn't work, get a test Ads from here , for example Banner ad format, paste it into your AndroidManifest.xml and change its meta-data value slash symbol (/) to tilda (~).
воскресенье, 8 декабря 2019 г.
"vue.use is not a function" fix
You should call vue.use() before vue object initialization (before calling new Vue({})), not after, and call it like static method, not instance method. For example:
import Vue from 'vue';
import App from "./App";
import * as VueWindow from '@hscmap/vue-window'
Vue.use(VueWindow);
let vue = new Vue({
el: '#app',
template: '<App></App>',
render: h => h(App)
})
export {vue};
import Vue from 'vue';
import App from "./App";
import * as VueWindow from '@hscmap/vue-window'
Vue.use(VueWindow);
let vue = new Vue({
el: '#app',
template: '<App></App>',
render: h => h(App)
})
export {vue};
среда, 9 октября 2019 г.
[Typescript] Inversify 'has no exported member Container fix
Error Module '"./node_modules/inversify/dts/inversify"' has no exported member 'Container'
it because you have inversify@2.0.0-rc.14 version. Update your inversify version to 5.0.1 with setting this version in package.json and running npm install.
it because you have inversify@2.0.0-rc.14 version. Update your inversify version to 5.0.1 with setting this version in package.json and running npm install.
четверг, 22 августа 2019 г.
Doctrine persists extra entities at update/merge fix
If you have batch create and update action simultaneously (persisting entity if it doesn't exists in DB or update it otherwise), made like in this documentation, and you noticed that it creates redundant entities, it means Doctrine think they are new. Enable "detach" cascade (transitional) operation in Doctrine like this:
/**
* @OneToMany(targetEntity="Customer", mappedBy="product", cascade={"detach"})
*/
protected $customers;
If you are not in dev environment, do not forget to run orm:clear-cache:metadata command.
/**
* @OneToMany(targetEntity="Customer", mappedBy="product", cascade={"detach"})
*/
protected $customers;
If you are not in dev environment, do not forget to run orm:clear-cache:metadata command.
четверг, 1 августа 2019 г.
[nodejjs] [websocket] Specified protocol was not requested by the client fix
If you have this error:
Error: Specified protocol was not requested by the client.
at WebSocketRequest.accept (/proj/node_modules/websocket/lib/WebSocketRequest.js:289:19)
this means you have to create a connection at client side like this:
var connection = new WebSocket('ws://127.0.0.1:3000', 'echo-protocol');
instead of this:
var connection = new WebSocket('ws://127.0.0.1:3000');
Also this means you should to handle it at server side not to crash your server.
Error: Specified protocol was not requested by the client.
at WebSocketRequest.accept (/proj/node_modules/websocket/lib/WebSocketRequest.js:289:19)
this means you have to create a connection at client side like this:
var connection = new WebSocket('ws://127.0.0.1:3000', 'echo-protocol');
instead of this:
var connection = new WebSocket('ws://127.0.0.1:3000');
Also this means you should to handle it at server side not to crash your server.
[Nodejs] Express + Websocket: Connection closed before receiving a handshake response
In case this error you should pass Express listen() return result to WebSocketServer() like this:
wsServer = new WebSocketServer({
httpServer: app.listen(3000),
port: 3001,
});
Full example:
var WebSocketServer = require('websocket').server;
var path = require('path');
var express = require('express');
var app = express();
app.use(express.static(path.join(__dirname, 'public')));
app.get('/', function(req, res){
res.render('index.html');
});
console.log(`Server running on port ${process.env.PORT}`);
wsServer = new WebSocketServer({
httpServer: app.listen(3000),
port: 3001,
});
wsServer = new WebSocketServer({
httpServer: app.listen(3000),
port: 3001,
});
Full example:
var WebSocketServer = require('websocket').server;
var path = require('path');
var express = require('express');
var app = express();
app.use(express.static(path.join(__dirname, 'public')));
app.get('/', function(req, res){
res.render('index.html');
});
console.log(`Server running on port ${process.env.PORT}`);
wsServer = new WebSocketServer({
httpServer: app.listen(3000),
port: 3001,
});
четверг, 25 апреля 2019 г.
[Sylius] The page you are looking for does not exist. at /payment/capture/Nvh8PX4pKVmoPE3xLd-AkXdtebcn_onUdnHiXX1KT-8
It occurs when order is created with non-default locale, and at Payum method locale is reset, because route /payment/capture/{token} doesn't contains locale code placeholder.
You can fix it with adding to payum.xml route config /{locale} prefix in another route file, for example shop.yaml file.
You can fix it with adding to payum.xml route config /{locale} prefix in another route file, for example shop.yaml file.
[Sylius] fix mysql errors with INSERT INTO sylius_shipping_method_translation after services.yaml locale changing
If you have errors similar to INSERT INTO sylius_shipping_method_translation (name, description, locale, translatable_id) VALUES (?, ?, ?, ?)' with params [null, null, "lv", 1] error after services.yaml changing locale , also with another Sylius tables, try to manually add these records in database.
For example, if you have problems with product db table, go to admin/products/{id}/edit and add translation to your main locale, do it for every product.
It occurs when you switch the main locale, then adding something to cart (in another words create an order). Order entity has relation to Shipping method, which has relation to Shipping method translation entity, which doesn't exists with needed locale. So Doctrine thinks it should persist before creating an Order, so there occurs an error.
For example, if you have problems with product db table, go to admin/products/{id}/edit and add translation to your main locale, do it for every product.
It occurs when you switch the main locale, then adding something to cart (in another words create an order). Order entity has relation to Shipping method, which has relation to Shipping method translation entity, which doesn't exists with needed locale. So Doctrine thinks it should persist before creating an Order, so there occurs an error.
воскресенье, 24 марта 2019 г.
Entity of type * passed to the choice field must be managed - solution fix
If available, try to use ChoiceType instead of EntityType form type.
вторник, 19 марта 2019 г.
[Symfony4 upgrade] bundle app does not exist or it is not enabled
Remove these lines in your
config/routes.yaml:app:
resource: '@App/Controller/'
type: annotation
среда, 13 марта 2019 г.
[MongoDB] [Symfony] "Could not find the document manager for class" fix with autowiring
For repository use this class below. Notice that it uses ManagerRegistry instead of Symfony\Bridge\Doctrine\RegistryInterface
<?php
use AppBundle\Document\Product;
use Doctrine\Bundle\MongoDBBundle\Repository\ServiceDocumentRepository;
use Doctrine\Bundle\MongoDBBundle\ManagerRegistry;
class ProductRepository extends ServiceDocumentRepository
{
public function __construct(ManagerRegistry $managerRegistry)
{
parent::__construct($managerRegistry, Product::class);
}
}
<?php
use AppBundle\Document\Product;
use Doctrine\Bundle\MongoDBBundle\Repository\ServiceDocumentRepository;
use Doctrine\Bundle\MongoDBBundle\ManagerRegistry;
class ProductRepository extends ServiceDocumentRepository
{
public function __construct(ManagerRegistry $managerRegistry)
{
parent::__construct($managerRegistry, Product::class);
}
}
воскресенье, 10 февраля 2019 г.
How to fix "phpcr/phpcr-implementation no matching package found"
If you have error:
Using version ^1.4 for doctrine/phpcr-odm
./composer.json has been updated
Loading composer repositories with package information
Updating dependencies (including require-dev)
Restricting packages listed in "symfony/symfony" to "4.2.*"
Your requirements could not be resolved to an installable set of packages.
Problem 1
- doctrine/phpcr-odm 1.4.4 requires phpcr/phpcr-implementation ^2.1 -> no matching package found.
- doctrine/phpcr-odm 1.4.3 requires phpcr/phpcr-implementation ^2.1 -> no matching package found.
- doctrine/phpcr-odm 1.4.2 requires phpcr/phpcr-implementation ^2.1.0 -> no matching package found.
- doctrine/phpcr-odm 1.4.1 requires phpcr/phpcr-implementation ^2.1.0 -> no matching package found.
- doctrine/phpcr-odm 1.4.0 requires phpcr/phpcr-implementation ^2.1.0 -> no matching package found.
- Installation request for doctrine/phpcr-odm ^1.4 -> satisfiable by doctrine/phpcr-odm[1.4.0, 1.4.1, 1.4.2, 1.4.
3, 1.4.4].
Potential causes:
- A typo in the package name
- The package is not available in a stable-enough version according to your minimum-stability setting
see <https://getcomposer.org/doc/04-schema.md#minimum-stability> for more details.
- It's a private package and you forgot to add a custom repository to find it
Read <https://getcomposer.org/doc/articles/troubleshooting.md> for further common problems.
You should add your project's composer.json these lines:
Symfony 4.2.3.
Using version ^1.4 for doctrine/phpcr-odm
./composer.json has been updated
Loading composer repositories with package information
Updating dependencies (including require-dev)
Restricting packages listed in "symfony/symfony" to "4.2.*"
Your requirements could not be resolved to an installable set of packages.
Problem 1
- doctrine/phpcr-odm 1.4.4 requires phpcr/phpcr-implementation ^2.1 -> no matching package found.
- doctrine/phpcr-odm 1.4.3 requires phpcr/phpcr-implementation ^2.1 -> no matching package found.
- doctrine/phpcr-odm 1.4.2 requires phpcr/phpcr-implementation ^2.1.0 -> no matching package found.
- doctrine/phpcr-odm 1.4.1 requires phpcr/phpcr-implementation ^2.1.0 -> no matching package found.
- doctrine/phpcr-odm 1.4.0 requires phpcr/phpcr-implementation ^2.1.0 -> no matching package found.
- Installation request for doctrine/phpcr-odm ^1.4 -> satisfiable by doctrine/phpcr-odm[1.4.0, 1.4.1, 1.4.2, 1.4.
3, 1.4.4].
Potential causes:
- A typo in the package name
- The package is not available in a stable-enough version according to your minimum-stability setting
see <https://getcomposer.org/doc/04-schema.md#minimum-stability> for more details.
- It's a private package and you forgot to add a custom repository to find it
Read <https://getcomposer.org/doc/articles/troubleshooting.md> for further common problems.
You should add your project's composer.json these lines:
"provide": { "phpcr/phpcr-implementation": "2.1.0"},
Symfony 4.2.3.
понедельник, 28 января 2019 г.
[Webpack] Module not found: Error: Empty dependency (no request) fix
If you have these errors in Webpack (encore):
This dependency was not found:
* in ./node_modules/css-loader??ref--1-2!./src/AppBundle/Resources/public/css/styles.css
or:
Module build failed: ModuleNotFoundError: Module not found: Error: Empty dependency (no request)
at factoryCallback (/var/www/project/core/node_modules/webpack/lib/Compilation.js:282:40)
It because you have background-image("") without an url. Add it or remove this attribute.
This dependency was not found:
* in ./node_modules/css-loader??ref--1-2!./src/AppBundle/Resources/public/css/styles.css
or:
Module build failed: ModuleNotFoundError: Module not found: Error: Empty dependency (no request)
at factoryCallback (/var/www/project/core/node_modules/webpack/lib/Compilation.js:282:40)
It because you have background-image("") without an url. Add it or remove this attribute.
вторник, 22 января 2019 г.
Symfony commands "environment variable not found" at migrating to symfony/dotenv fix
Add use Symfony\Component\Dotenv\Dotenv; at the beginning of file bin/console.php at the beginning of file and before line "require __DIR__.'/../vendor/autoload.php';"add (new Dotenv())->load(__DIR__.'/../.env');
So it should looks like:
#!/usr/bin/env php
<?php
use Symfony\Bundle\FrameworkBundle\Console\Application;
use Symfony\Component\Console\Input\ArgvInput;
use Symfony\Component\Debug\Debug;
use Symfony\Component\Dotenv\Dotenv;
// if you don't want to setup permissions the proper way, just uncomment the following PHP line
// read https://symfony.com/doc/current/setup.html#checking-symfony-application-configuration-and-setup
// for more information
//umask(0000);
set_time_limit(0);
require __DIR__.'/../vendor/autoload.php';
(new Dotenv())->load(__DIR__.'/../.env');
$input = new ArgvInput();
$env = $input->getParameterOption(['--env', '-e'], getenv('SYMFONY_ENV') ?: 'dev');
$debug = getenv('SYMFONY_DEBUG') !== '0' && !$input->hasParameterOption(['--no-debug', '']) && $env !== 'prod';
if ($debug) {
Debug::enable();
}
$kernel = new AppKernel($env, $debug);
$application = new Application($kernel);
$application->run($input);
So it should looks like:
#!/usr/bin/env php
<?php
use Symfony\Bundle\FrameworkBundle\Console\Application;
use Symfony\Component\Console\Input\ArgvInput;
use Symfony\Component\Debug\Debug;
use Symfony\Component\Dotenv\Dotenv;
// if you don't want to setup permissions the proper way, just uncomment the following PHP line
// read https://symfony.com/doc/current/setup.html#checking-symfony-application-configuration-and-setup
// for more information
//umask(0000);
set_time_limit(0);
require __DIR__.'/../vendor/autoload.php';
(new Dotenv())->load(__DIR__.'/../.env');
$input = new ArgvInput();
$env = $input->getParameterOption(['--env', '-e'], getenv('SYMFONY_ENV') ?: 'dev');
$debug = getenv('SYMFONY_DEBUG') !== '0' && !$input->hasParameterOption(['--no-debug', '']) && $env !== 'prod';
if ($debug) {
Debug::enable();
}
$kernel = new AppKernel($env, $debug);
$application = new Application($kernel);
$application->run($input);
пятница, 5 октября 2018 г.
[Sulu] how to fix /admin blank page
To fix admin login page white screen, run: php bin/console sulu:translate:export
вторник, 11 апреля 2017 г.
"Sylius was not able to figure out the current cart" error
Just switch to needed channel in Symfony Debug Toolbar.
вторник, 4 апреля 2017 г.
symfony+aimeos+extadm: infinite "loading..."
Can be fixed by adding in your php.ini string: always_populate_raw_post_data = -1
Got from https://aimeos.org/help/help-f15/installed-aimeos-with-laravel-screen-stuck-at-expert-mode-t721.html
Got from https://aimeos.org/help/help-f15/installed-aimeos-with-laravel-screen-stuck-at-expert-mode-t721.html
четверг, 15 декабря 2016 г.
twig unrecognized field 0
because you forget add parameter as associated array, for example
findOneBy(['providerReference' => $reference])
, not (['provideReference', $reference])
четверг, 3 ноября 2016 г.
[Symfony] [ckeditor] browse / upload buttons missing - how to fix
be sure you don't have duplicate call of ivory_ck_editor in config.yml file.
Подписаться на:
Сообщения (Atom)