Plugins for WordPress not installing on Bluemix - wordpress

I am trying to make a WordPress site on Bluemix. I need a specific theme and plugin for my site. I used wpackagist to grab the lines of code I needed to add in my composer.json file. I went into my Bluemix dashboard, clicked edit code, added the lines from wpackagist into the requirements block of code (the code below) and then hit the play button (tried to post pic with post but not enough reputation) However, when I went to my Bluemix site, the plugin and theme were not installed. I looked at the composer.lock file and it doesn't look like the theme and plugin are in that file. I have seen places that I need to run a composer update or a push, but I am not sure how. Thanks!
"require": {
"ext-gd" : "*",
"johnpbloch/wordpress" : "*",
"ibmjstart/wp-bluemix-objectstorage" : "~2.1.1",
"ibmjstart/wp-bluemix-config" : "dev-master",
"wpackagist-plugin/stops-core-theme-and-plugin-updates": "*",
"wpackagist-plugin/sendgrid-email-delivery-simplified": "*",
"wpackagist-plugin/wp-super-cache" : "*",
"wpackagist-theme/twentyfourteen" : "*",
"wpackagist-theme/twentyfifteen" : "*",
"wpackagist-theme/twentysixteen" : "*",
"wpackagist-plugin/eventbrite-services": "1.3.1",
"wpackagist-theme/eventbrite-venue": "1.3.0"
},

I believe I solved my own problem! I did not realize that after you make your changes to the composer file that you then had to go onto Wordpress and install the plugin and theme. I was assuming they would just automatically pop up. Lesson learned!
It is a little confusing since the warning still pops up that it will delete any plugins and themes but I guess that warning is only for users who did not make changes to the composer file. Hope my struggles help someone else!

Related

Drupal ComputedItemListTrait::getValue() must be compatible FieldItemList::getValue($include_computed = false)

Hey so my hosting provider dropped support for anything below php 7 so need to update my drupal site from 8.4 to 8.6 so i wont break etc.
when trying to update running the 'composer outdated "drupal/*"' command nothing is returned at all even when I added '"drupal/core": "^8.6.1"' to the 'require' section of the 'composer.json'
and the site is mostly fine but i cant add any content and get the following error :
Fatal error: Declaration of Drupal\Core\TypedData\ComputedItemListTrait::getValue() must be compatible with Drupal\Core\Field\FieldItemList::getValue($include_computed = false) in \core\modules\path\src\Plugin\Field\FieldType\PathFieldItemList.php on line 13
and here is some of my composer.json which mentions drupal
"require": {
"composer/installers": "^1.0.24",
"wikimedia/composer-merge-plugin": "^1.4",
"drupal/core": "^8.6.1"
},
"replace": {
"drupal/core": "^8.4"
},
so i'm summary im not even sure my drupal has been updated but the site works fine apart from where I add content I get a php error saying a module is not compatible for the core.
That error looks like a PHP 7 compatibility issue, so I would assume that your Drupal version has not been updated.
You can check your current version of Drupal on the status report page when logged-in - Reports > Status report (from the administrative toolbar) or https://yoursite.com/admin/reports/status
Running composer require directly (rather than editing composer.json) is the best way to ensure an appropriate version of Drupal core is correctly installed, as follows:
$ composer require drupal/core^8.6.1
This will ensure the composer.lock file is also updated when installing an appropriate version of Drupal core.

Install Bootstrap (on Angular,but with errors)

Thank you all for your answers. I find the problem, it is all because i didnt get full install of angularcli.(now i fix)
Try use npm start, to start Angular project but ERROR in ./~/css-loader?{"sourceMap":false,"importLoa[enter image description here][1]ders":1}!./~/postcss-loader!./src/styles.css
Module build failed: BrowserslistError: Unknown browser querydead
and
ERROR in ./src/app/app.component.css
Module build failed: BrowserslistError: Unknown browser query dead
`
`In package.json ( "bootstrap": "4.0.0-alpha.4")
In code already exist bootstrap code (for example <h3 class="bg-primary p-a-1"> cos i get this code from rep (but at work computer Angular work normally , but at home pc something goes wrong). Can you explain me why? And maybe can say how to fix it.
Thank you all for your answers. I find the problem, it is all because i didnt get full install of angularcli.(now i fix)
Did you try by adding to angular.json file on the styles property:
"styles": ["node_modules/bootstrap/dist/css/bootstrap.min.css", "src/styles.scss"]
And on package.json file try adding: "bootstrap": "^4.1.1",

WordPress Bedrock Advanced Custom Field as dependency

I am setting up a WordPress site with BedRock and was thinking if there is a way to "require" the ACF plugin in my composer.
So the plan is to have clean and simple repo where you do a git pull and composer install and then everything gets installed (including plugins)
But I don't find any documentation on the ACF site on how to do this.
Is this even possible? lol
I found this package but it's for ACF Pro and I just need the free version.
https://github.com/PhilippBaschke/acf-pro-installer
If anyone has any experience with BedRock and can help me out that would be greatly appreciated :)
Many thanks in advance!
If you add the wpackagist repository to Composer's "repositories", you can then require the ACF free version.
In Bedrock's composer.json add the wp-packagist repo:
"repositories": [
{
"type": "composer",
"url": "https://wpackagist.org"
}
],
...
Then in the same file, require the plugin:
"require": {
"php": ">=5.6",
"composer/installers": "~1.0.12",
"vlucas/phpdotenv": "^2.0.1",
"johnpbloch/wordpress": "4.7.2",
"oscarotero/env": "^1.0",
"roots/wp-password-bcrypt": "1.0.0",
"roots/soil": "3.7.1",
"wpackagist-plugin/advanced-custom-fields" : "4.1.*"
},
...
Run composer update and it should fetch the plugin.
Side note, the https://github.com/PhilippBaschke/acf-pro-installer tool is no longer supported and doesn't work with Composer 2 or ACF versions > 5.10.x
To fix the second issue with ACF versions, in src/ACFProInstaller/Plugin.php edit line 187 to:
$major_minor_patch_optional = '/\A\d\.\d{1,2}\.\d{1,2}(?:\.\d)?\Z/';
For Composer 2 compatibility, see
https://github.com/pivvenit/acf-pro-installer and https://github.com/ffraenz/private-composer-installer are two options for replacements.
https://github.com/PhilippBaschke/acf-pro-installer/issues/44 describes the differences concisely.

Composer install wp-plugin to vendor dir

I'm using Roots/Bedrock for my WordPress structure and I want to use WebDevStudios/CMB2 as a library and not as a plugin.
The Roots/Bedrock composer.json specifies that dependencies of type:wordpress-plugin be installed in app/plugins. The WebDevStudios/CMB2 composer.json declares that it is a wordpress-plugin type, so it gets installed into app/plugins which is not where I want it.
How can I get this dependency to be installed into vendor and not app/plugins?
I have a suspicion I might have to fork CMB2 and change it's type from wordpress-plugin to library, but I'm hoping there is a cleaner solution.
I'm not using Roots/Bedrock but I had a similar problem when adding CMB2 as a dependency to a plugin (rather than loading it as a separate plugin). It was installing the plugin in wp-content/plugins instead of vendor. The following worked for me.
{
"require": {
"webdevstudios/cmb2": "^2.2",
},
"autoload" : {
"files": [
"vendor/webdevstudios/cmb2/init.php"
]
},
"extra": {
"installer-paths": {
"vendor/webdevstudios/cmb2": ["webdevstudios/cmb2"]
}
}
}
The key was the installer-paths entry that tells Composer where we want to install webdevstudios/cmb2.
I wrote a blog post about this at https://salferrarello.com/cmb2-composer-dependency/

gclient runhooks fails

I'm trying to build Chrome under windows, I got the chromium trunk using tortoiseSVN and I believe I got everything correctly, but when I run "gclient runhooks" I get the error: "Error: client not configured; see 'gclient config'".
Now, I know that it happens because I don't have a ".gclient" file on the same directory, but I couldn't find .gclient file anywhere in the project. I tried to create .gclient file myself but it says there's a solution missing.
I'm probably missing something, can anyone help me with that? I'm pretty stuck!
Thanks!
gclient config http://src.chromium.org/svn/trunk/src
gclient runhooks
Or make a .gclient file with the following content, which skips the huge amount of webkit layout tests
solutions = [
{ "name" : "src",
"url" : "http://src.chromium.org/svn/trunk/src",
"deps_file" : "DEPS",
"managed" : True,
"custom_deps" : {
"src/third_party/WebKit/LayoutTests": None,
"src/chrome_frame/tools/test/reference_build/chrome": None,
"src/chrome/tools/test/reference_build/chrome_mac": None,
"src/chrome/tools/test/reference_build/chrome_win": None,
"src/chrome/tools/test/reference_build/chrome_linux": None,
},
"safesync_url": "",
},
]
The above solution is out-dated. Running with the SVN repository results in:
Error:
The chromium code repository has migrated completely to git.
Your SVN-based checkout is now obsolete; you need to create a brand-new
git checkout by following these instructions:
http://www.chromium.org/developers/how-tos/get-the-code
Now you need to create a .gclient file like this
solutions = [
{
"managed": False,
"name": "src",
"url": "https://chromium.googlesource.com/chromium/src.git",
"custom_deps": {},
"deps_file": ".DEPS.git",
"safesync_url": "",
},
]
and do:
gclient sync
Chromium does not include a preconfigured .gclient file for the Chromium build and does not automatically handle Visual Studio versioning changes and default Deploy toolkit hints. After you have successfully downloaded the deploy tools and the chromium source code as provided at chromium.org perform the following in the root directory where your deploy_tools and src code is located.
NOTE : If you receive errors try to start a new command prompt session and try again.
set DEPOT_TOOLS_WIN_TOOLCHAIN=0
set GYP_MSVS_VERSION = 2015
gclient config https://chromium.googlesource.com/chromium/src.git
gclient sync
gclient runhooks
cd src
ninja -C out\Debug chrome
The build will take some time gclient runhooks should generate the build folder.

Resources