php bin/console assets:install --symlink not working - orocommerce

I am trying to change the logo following: https://doc.oroinc.com/frontend/storefront/how-to/how-to-replace-the-logo/ . I followed the steps to create an empty bundle, the bundle shows up in the symfony "active bundles" list so it seems to have registered correctly.
The theme definition in: Resources/views/layouts/my_theme/theme.yml :
label: My Theme
logo: bundles/companytheme/my_theme/images/mainlogo.svg
parent: default
groups: [ commerce ]
also seems to work, the "My Theme" is available in the backend>System>Configuration>Commerce>Design>Theme
But the logo doesn't work, there is just nothing. So I looked into public/bundles/ and noticed there is no symlink to the Resource files of my bundle.
Running
php bin/console assets:install --symlink
works, but it only shows the symlinks that are already there

Firstly make sure that you put your logo image into public folder like:
NEW_BUNDLE/package/Resources/public/img/logo.svg/.
Then add a logo property with value from public folder: bundles/NEW_BUNDLE/images/mainlogo.svg into theme.yml and clear the application cache and rerunning the command:
rm -rf var/cache/*
php bin/console assets:install --symlink

Related

How to create and deploy an endpoint with Directus?

I have a nooby Directus question :
How to create an endpoint and attach it to my project ?
I try to follow the doc in vain :
Create a directus project
npm init directus-project example-project
SQLite / Admin / Password
cd example-project; npx directus start
I can access directus admin at http://0.0.0.0:8055/admin/content
CTRL+C
Create an endpoint
cd .., going away of my directus project, npm init directus-extension
endpoint / demo-directus-endpoint / javascript
Modifying endpoint / to /hello in src/index
cd demo-directus-endpoint; npm run build
Deploy extensions inside directus project
https://docs.directus.io/extensions/creating-extensions/
To deploy your extension, you have to move the output from the dist/ folder into your project's ./extensions/<extension-folder>/<extension-name>/ folder. <extension-folder> has to be replaced by the extension type in plural form (e.g. interfaces). <extension-name> should be replaced with the name of your extension.
cd ../example-project
mkdir ./extensions/endpoints/demo
cp -R ../demo-directus-endpoint/dist/index.js ./extensions/endpoints/demo
index.js looks like this :
"use strict";module.exports=e=>{e.get("/hello",((e,l)=>l.send("Hello, World!")))};
npx directus start
17:43:40 ✨ Loaded extensions: demo
17:43:40 ⚠️ PUBLIC_URL should be a full URL
17:43:40 ⚠️ Spatialite isn't installed. Geometry type support will be limited.
17:43:40 ✨ Server started at http://0.0.0.0:8055
Trying to get url http://0.0.0.0:8055/hello
curl http://0.0.0.0:8055/hello => {"errors":[{"message":"Route /hello doesn't exist.","extensions":{"code":"ROUTE_NOT_FOUND"}}]}
17:43:55 ✨ request completed GET 404 /hello 8ms
What to do in order to get Hello, World! when curl http://0.0.0.0:8055/hello ?
Thank you for your help
Answer found
curl http://0.0.0.0:8055/demo/hello => Hello, World!

Odoo 10 : Auto install custom modules on odoo start

Is there any way to auto install or upgrade my custom modules when i start my odoo?
I tried
'installable': True,
'auto_install': True,
'active': True,
in my manifest file. but still i have to install my module manually.
You can Odoo tell on start (for example in default Debian as service you will find everything in /etc/init.d/odoo) by using following parameters:
-d
specify a database
-i
comma-separated list of modules to install
-u
comma-separated list of modules to update
For example (Odoo 12):
odoo-bin -c /etc/odoo/odoo.conf -d my_database -i website -u sale
will start Odoo with the given configfile and install app "Website" and update App "Sale" on database my_database.
The manifest key auto_install is only for auto installation, when all module dependencies are satisfied. One simple example: After installing sale and stock you will find sale_stock also installed, because it has auto_install set and depends on sale and stock.

How do I remove CLion-2016.2.3 completely from Ubuntu 16.04 LTS?

I had installed CLion(2016.2.3) IDE from CLion-2016.2.3.tar.gz file. I accidentally deleted the CLion-2016.2.3.tar.gz file and CLion-2016.2.3 folder(which I got after extracting CLion-2016.2.3.tar.gz). Now CLion isn't working. When I ran dpkg --list from terminal, CLion wasn't present in the output. I want to remove CLion completely(all its files, folders, dependencies, etc.(even the configuration files)). How do I remove it completely?
Run the following command in terminal to find all the directories and files containing clion in their name :-
$ sudo find . -iname "*clion*"
Then delete the directories and files you have found.
To delete directories/files, go to the location of that directory/file in terminal using cd and run the following command :-
$ sudo rm -rf DIRECTORY_NAME/FILE_NAME
Simple Steps are :
Delete the clion folder you have downloaded and extracted.
Remove cache in ~/. using the command : sudo rm -r ~/.Clion.
Also need remove settings: /home/user/.config/JetBrains
You need also to remove settings that are stored in ~/. directory. That's it for Unix/Linux.
All Clion's binaries are store inside the folder you deleted.
But Clion sets up preferences at first launch, and you may have a menu icon which is pointing nowhere.
I suggest you run something like find ~ -iname "*clion*" and investigate what is found. If you are using Gnome2 or MATE desktop you will certainly find .desktop files which are the icons you are looking for.
If you used snap to install you can uninstall using
sudo snap remove --purge clion

Is it possible to use AWS Beanstalk's .ebextensions config to install mod_pagespeed Apache module?

I'm using AWS Beanstalk for my Django/Python application, and I would like to use Google's mod_pagespeed module. Is it possible to install and run mod_pagespeed using the .ebextensions/.config file?
Download the package
Add the rpm into your ebextensions directory
create a .config file in the .ebextensions directory
add commands to the config file like this:
container_commands:
01-command:
command: rm -rf /pagespeed/ebextensions
02-command:
command: mkdir -p /pagespeed/ebextensions
03-command:
command: cp -R .ebextensions/* /pagespeed/ebextensions/
04-command:
command: rpm -U /pagespeed/ebextensions/mod-pagespeed.rpm
Ensure the commands are indented as shown, with no tabs, otherwise it wont work.
swap "mod-pagespeed.rpm" for whatever the actual rpm file name is.
Ok so I want to add Charlie Smith's answer. I would suggest you make sure you have the following things turned on.
mod_deflate - You probably want to Gzip your html, css, xml, and javascript.
Enable the rewrite domains filter in your Apache.conf if you use CDN (ex. AWS CloudFront)
Set a short cache-control for images and css so pagespeed will be able to extend the cache when you turn on the extend_cache filter.
I also like the rewrite_javascript, dns_prefetch, collapse_whitespace, and combine_javascript filters.
Here are the GitHub Gists that show you how its done.
The apache conf file
The Beanstalk container_commands (they are mostly the same as Charlie's)
Thanks guys! I got it working great following your answer #man2xxl.
You don't have to mess with the /pagespeed/extensions directory though, the beanstalk .ebextensions config can simply be:
packages:
yum:
at: []
10_setup_apache_for_mod_pagespeed:
command: "cp enable_mod_pagespeed.conf /etc/httpd/conf.d"
20_install_mod_pagespeed:
command: rpm -U -iv --replacepkgs mod-pagespeed-*.rpm
30_clear_mod_pagespeed_cache:
command: touch /var/cache/mod_pagespeed/cache.flush
You can install packages by URL. So you don't have to download and distribute the RPM. Something like this works:
packages:
rpm:
pagespeed: https://dl-ssl.google.com/dl/linux/direct/mod-pagespeed-stable_current_x86_64.rpm
files:
"/etc/httpd/conf.d/zzzz-pagespeed-options.conf":
mode: "00644"
owner: root
group: root
encoding: plain
content: |
# put your pagespeed configuration here
Note that I titled the file zzzz-pagespeed-options.conf so that the httpd server will load it last.
Another advantage of this is you really don't need include any commands whatsoever or worry about copying files over
and maintaining the files in your .ebextensions folder. You just update the files entry in the .config file.

Unable to move file to packages directory-socialengine addons core plugin

While uploading the socialengine addon's core plugin (module-seaocore-4.2.9p1.tar) through package manager, I am getting an error
Unable to move file to packages directory.
Please set chmod 0777 on the temporary/package/archives directory.
But, if we try to upload any other plugin, it will get extracted in the normal way.
I have checked the file permission and it is already 777.
Uploading the tar to temporary/package/packages and extracting it into a folder (final path: temporary/package/packages/module-seaocore-4.2.9p1) does not always work for me.
However, the following steps do seem to work if you have chmod 777 permission set on both your temporary/package/packages and temporary/packages/archives directories:
Try the installation and let it fail with the above error message
Upload the tar to temporary/package/archives
Go back to the Manage Packages & Plugins screen in the SE admin panel, and then click Install New Packages
It will find the tar in temporary/package/archives, process the extraction to temporary/package/packages, and let you install
I've replicated this a number of times now, and it seems to work.
I fixed this issue by uplading the tar file to temporary/package/packages and extracted it to the folder with the name module-seaocore-4.2.9p1.
Then deleted the tar file and went to package manager and installed the plugin.
I got the solution for this,
Extract the ".tar file" and then open the "applications" folder and you will find 3 folder "languages, modules, packages" copy all the files and folders you find in these folders and paste them to the respective "application" folder in your working directory,
remember
After copying them again give the chmod - R 0777 permission to you package directory of working folder.
sudo chmod -R 0777 packages/
Now you can find an option to install the plugin in "Manage Plugin" section in the admin pannel.