If truffle compile or truffle migrate hangs, try to run rm -rf build/ in your project directory, or in Windows delete "build" directory manually.
четверг, 27 декабря 2018 г.
четверг, 20 декабря 2018 г.
[Payum] GetHttpRequest is empty fix
It because you call it wrong:
$details = $this->gateway->execute(new GetHttpRequest());
you should do it correctly as below:$this->gateway->execute($details = new GetHttpRequest());
среда, 19 декабря 2018 г.
invalid user: ‘vagrant:vagrant’ fix
This means you don't have such user in guest OS. Check also `override.ssh.username` in machine Vagrantfile
вторник, 18 декабря 2018 г.
PHP + Mongodb Invalid type specified "object" how to fix
Add to your bundle class in build() method: Type::addType('object', 'Payum\Bridge\Doctrine\Types\ObjectType');
For example:
For example:
<?php namespace Acme\PaymentBundle; use Doctrine\ODM\MongoDB\Types\Type; use Symfony\Component\DependencyInjection\ContainerBuilder; use Symfony\Component\HttpKernel\Bundle\Bundle; class AcmePaymentBundle extends Bundle { public function build(ContainerBuilder $container) { Type::addType('object', 'Payum\Bridge\Doctrine\Types\ObjectType'); } }This error also occurs if you trying to add mongodb token storage to Payum payment system.
понедельник, 17 декабря 2018 г.
How to copy class FQCN in Phpstorm
To copy name full name, set cursor to class declaration and press Ctrl-Shift-Alt-C.
вторник, 11 декабря 2018 г.
How to install omnipay-bridge & omnipay-neteller to payum
If you have problems with installing omnipay bridge to symfony 3.4, try these aliases in root composer.json in 'require' scope:
"omnipay/common": "3.0.2 as 2.5.2",
"payum/omnipay-bridge": "1.2.5 as 1.2.4"
"omnipay/common": "3.0.2 as 2.5.2",
"payum/omnipay-bridge": "1.2.5 as 1.2.4"
среда, 5 декабря 2018 г.
[KDE] numpad digits not working how to fix
Find in launcher for "Keyboard" control window, in tab "advanced" in "moscellaneous compatibity options" group set ticks for "default numeric keypad keys" and "Num Lock on: digits; Shift for arrow keys. Num Lock off: arrow keys (as in Windows)".
If it doesn't work, find "Mouse" control window, in tab "keyboard navigation" remove checkbox for "move pointer with keyboard".
KDE plasma version 5.12.6, Kubuntu 18.04
If it doesn't work, find "Mouse" control window, in tab "keyboard navigation" remove checkbox for "move pointer with keyboard".
KDE plasma version 5.12.6, Kubuntu 18.04
воскресенье, 2 декабря 2018 г.
AWS after destroying instance creates it again fix
When you cannot stop and destroy instance and something creates them again, remove autoscaling group/configuration from menu on the left.
The issue appears after using ecs-cli utility and creating EC2 clusters.
The issue appears after using ecs-cli utility and creating EC2 clusters.
пятница, 30 ноября 2018 г.
Aws ecs-cli created fargate instance instead of ec2 fix
Be sure you ran ecs-cli up --capability-iam --instance-type t2.micro with argument --cluster-config <configname>
, where configname is already created with ecs-cli configure command.
, where configname is already created with ecs-cli configure command.
пятница, 23 ноября 2018 г.
Bootstrap modal "Maximum call stack size exceeded" error fix
If you receive this error, another solution is to hide all other modals before opening current modal. Bootstrap 3.3.7
суббота, 10 ноября 2018 г.
gta 3 how to disable drunk slow mo effect
To disable dizziness or slowmo effect in GTA III, in game video settings make "Trails" disabled.
четверг, 8 ноября 2018 г.
[Ethereum] Web3 "Couldn't connect to node" fix
If you have "Couldn't connect to node http://localhost:8545", check your web3 smart contract function arguments, maybe you're added redundant parameter ({value: ...} in my case). Worked on Parity v2.1.3 on Docker
вторник, 6 ноября 2018 г.
[Ethereum] Remix: Uncaught JavaScript exception: RangeError: Maximum call stack size exceeded.
Try to use Firefox for this site instead of Chrome-based browsers.
четверг, 1 ноября 2018 г.
[Sulu] cannot save page changes
When this issue occurs, in Symfony logs exists this message:
request.CRITICAL: Uncaught PHP Exception Sulu\Component\Content\Form\Exception\InvalidFormException: "[authored] This value is not valid
The solution is to upgrade to Sulu v1.6.22, it downgrades Symfony from 3.4.17 to 3.4.14.
Appeared in v1.6.21
request.CRITICAL: Uncaught PHP Exception Sulu\Component\Content\Form\Exception\InvalidFormException: "[authored] This value is not valid
The solution is to upgrade to Sulu v1.6.22, it downgrades Symfony from 3.4.17 to 3.4.14.
Appeared in v1.6.21
[sylius standalone bundles] "DataSource::__construct() must be an instance of Doctrine\ORM\QueryBuilder, null given" error fix
It means that your Grid repository method doesn't return QueryBuilder, maybe at now you return array/one entity objects with getResult() method inside Repository method.
Example of correct QueryBuilder repository method:
Notice that there is no getResult()/getOneOrNullResult()/getSingleResult().
Appears in versions Sylius 1.0 - 1.3, maybe earlier.
Example of correct QueryBuilder repository method:
public function createPrivateListQueryBuilder(int $residentId): QueryBuilder{ return $this->createQueryBuilder('a') ->leftJoin('a.user', 'user') ->where('user.id = :id') ->setParameter('id', $residentId);}
Notice that there is no getResult()/getOneOrNullResult()/getSingleResult().
Appears in versions Sylius 1.0 - 1.3, maybe earlier.
среда, 31 октября 2018 г.
[swiftmailer] Cannot send message without a sender address error fix
Do not forget to use (new \Swift_Message())->setFrom([$senderAddress => $senderName]) when preparity an email. Interesting that it doesn't throw an exception in Symfony DEV environment, but do that in PROD.
пятница, 26 октября 2018 г.
[Ethereum] Chainlink Ropsten faucet doesn't sends LINK tokens
If https://ropsten.chain.link/ doesn't send test tokens to your wallet, try to use https://kovan.chain.link/ on Kovan, it worked to me.
четверг, 18 октября 2018 г.
[Ubuntu] chrome/opera video not working
If your video not working in Facebook/VK, run sudo apt-get install chromium-codecs-ffmpeg-extra
It not worked by default because of licence restrictions.
It not worked by default because of licence restrictions.
среда, 17 октября 2018 г.
KDE cannot move cursor to another display fix
In System settings > Display and Monitor (or find in launcher "Displays") in displays preview make that two displays will be snapped together, instead of just were near to each other. Press "apply" and apply the changes.
пятница, 5 октября 2018 г.
[Sulu] how to fix /admin blank page
To fix admin login page white screen, run: php bin/console sulu:translate:export
среда, 26 сентября 2018 г.
[Docker] how to solve 'VOLUME: not found' or 'COPY: not found'
If you receive a "/bin/sh: COPY: command not found" (or VOLUME) error, you should check that previous Dockerfile line is closed properly. For example, if you have similar like below,
RUN set -eux; \ apk add --no-cache --virtual .build-deps \ git \ ;
do not forget to enclose your line with \ and ; symbols.
вторник, 11 сентября 2018 г.
[Linux] another way to fix Jetbrains Russian layout hotkeys
If you cannot use Jetbrains phpstorm/idea hotkeys with Russian layout on Ubuntu, try to install KDE instead of GNOME, because this issue doesn't appears in Kubuntu.
вторник, 4 сентября 2018 г.
How to debug FormData object
If your FormData object named as formData in code, you can debug it with Array.from(formData.entries())
воскресенье, 2 сентября 2018 г.
[Ethereum] [Mist] geth runtime error: invalid memory address or nil pointer dereference
If you often receive mentioned error, delete ~.config/Mist/mist.lokidb file on Linux at closed Mist client.
понедельник, 20 августа 2018 г.
Fedora - how to increase browser scroll speed
To increase mouse wheel speed, just install rpm binary package from https://fedora.pkgs.org/28/russian-fedora-free-i386/imwheel-1.0.0-0.1.pre12.fc28.i686.rpm.html . After installing, you will feel that scroll speed increased. Do not forget add it to autostart
четверг, 2 августа 2018 г.
Symfony how to bind request data to form without HTML
When you want to bind data to form (for example in your REST application) as in FOSRestBundle, but after handleRequest() you doesn't have submitted data, try to map it with
$this->get('form.factory')->createNamed('', MyFormType::class, $dummy, ['csrf_protection' => false]);
, where first parameter is empty string, the second is form, $dummy is for model or entity object. So you can use form validation in simple Symfony action.
$this->get('form.factory')->createNamed('', MyFormType::class, $dummy, ['csrf_protection' => false]);
, where first parameter is empty string, the second is form, $dummy is for model or entity object. So you can use form validation in simple Symfony action.
понедельник, 30 июля 2018 г.
FOSRestBundle invalid form doesn't use ExceptionWrapper
If your FOSRestBundle response doesn't have normal type, (for example, as below):
{ "form": { "children": { "currency": {}, "limit": { "errors": [ "This value should be greater than or equal to 0." ] }, "": {}, "name": {} } }, "errors": [] },As we see, there are no 'code' and 'message' keys, so FOSRestBundle type is wrong. To fix it, use
$view->getContext()->setAttribute('status_code', Response::HTTP_BAD_REQUEST);for your $view object.
среда, 4 июля 2018 г.
Notice: undefined index id after changing MongoDB id to string
after using a php annotation @Mongo\Id(strategy="NONE") you can receive Notice: undefined index id PHP error, for this just run symfony cache:clear command.
вторник, 15 мая 2018 г.
Sulu /admin/translations/sulu.en.json?v=develop error fix
Be sure you haven't deleted sulu.en.json in project web/admin, and there anything will not be deleted (for example as Vagrant's Rsync do that). After this restore translations with php bin/console sulu:translate:export .
понедельник, 7 мая 2018 г.
Symfony FileType doesnt append file
If you cannot receive file on form submit (file field left null), be sure your {{ form_row(file) }} is inside {{ form-start(form) }} and {{ form_end(form) }}, and also check is this scope closed properly, check this in Devtools.
суббота, 5 мая 2018 г.
How to fix Sulu page previews
thanks to this commit, you can update Sulu from 1.6.17 to 1.6.18 and receive this fix.
понедельник, 30 апреля 2018 г.
How to fix "the system cannot find the file specified. (code: 2)" and "unable to evaluate symlinks in Dockerfile"
If you receive "unable to evaluate symlinks in Dockerfile path" or "windows named pipe error: the system cannot find the file specified. (code: 2)" errors on Docker for Windows, enable Hyper-V in "turn on or off windows features" app and restart the computer.
среда, 25 апреля 2018 г.
how to fix Liip Imagine Bundle gets image only after browser page refresh
Be sure you didn't left somewhere dump() function at `resolve` route. It prevents of creating correct 301 response. Symfony in Profiler write it is 301, but actually in Chrome Devtools it is 200 because of dump() php function.
четверг, 19 апреля 2018 г.
[Symfony] how to disable "request.INFO: Matched route" messages in Monolog logs
app/config/config_prod.yml:
monolog:
handlers:
main: channels: ["!request"]
and run cache:clear -e prod if you on PROD environment.
среда, 18 апреля 2018 г.
[Sonata] "A non well formed numeric value encountered" error at upload
be sure you are using appropriate context in related form type in Sonata Admin class. If you doesnt need resizing or changing image compression, try to remove formats node in config.yml sonata_media node. It should looks like similar, without formats:
banner: providers: - sonata.media.provider.image
вторник, 17 апреля 2018 г.
how to fix 'Mysql has gone away'
just ensure you have swap file and add to /etc/mysql/my.cnf :
max_allowed_packet=32M
wait_timeout=172800
max_allowed_packet=32M
wait_timeout=172800
понедельник, 5 марта 2018 г.
[Sylius standalone bundles] An instance of Symfony\Bundle\FrameworkBundle\Templating\EngineInterface must be injected in FOS\RestBundle\View\ViewHandler to render templates.
Add this in app/config/config.yml:
framework:
...
templating:
engines: ['twig']
framework:
...
templating:
engines: ['twig']
четверг, 8 февраля 2018 г.
VichUploaderBundle doesnt call setFile() entity method, uploading not working
For me helped using using {{ form_start(form) }} instead of creating <form> tag by itself.
Подписаться на:
Сообщения (Atom)