Enable BuddyPress Mentions and also Email Notifications in bbPress

BuddyPress @mentions were working perfectly within WordPress posts and comments however not in bbPress.

This is one solution to get @mention user lookups and an email notification when used in a topic or thread reply.  However a notification is not logged within BuddyPress.

First create or modify the following file in your WordPress install
/wp-content/plugins/bp-custom.php

Sources:
https://codex.buddypress.org/themes/bp-custom-php/
https://gist.github.com/imath/5a3c4ac645ec765863f2

<?php
function custom_bbpress_maybe_load_mentions_scripts(
$retval = false ) {
if ( function_exists( 'bbpress' ) && is_bbpress() ) {
$retval = true;
}
return $retval;
}
add_filter( 'bp_activity_maybe_load_mentions_scripts', 'custom_bbpress_maybe_load_mentions_scripts' );

Then you will need to install the bbPress Toolkit plugin for WordPress.

Once activated navigate to Tools -> bbP Toolkit in WordPress Dashboard. Then choose Extras at the top and confirm mentions are enabled.

 

A second option is to use the bbp Mentions Suggest plugin available at this website:

http://www.rewweb.co.uk/download/bbp-mentions-suggest/

How to Install Latest WordPress on Ubuntu Server 18.04

These are the minimum steps I needed to get WordPress running on Ubuntu Server 18.04. It is based on the below guide at the time of this writing:

https://wordpress.org/support/article/how-to-install-wordpress/#detailed-instructions

 

  1. During the install and setup of Ubuntu Server 18.04, the only option I chose beyond the defaults was to install Open SSH server but is not required depending on your needs.
  2. sudo apt install apache2
  3. Optional: if you want SSL support
    sudo a2enmod ssl
  4. sudo apt install mysql-server
  5. Set up a MySQL user and database for WordPress to use by using the debian-sys-maint user:
    sudo cat /etc/mysql/debian.cnf
    mysql -u debian-sys-maint -p(copy/paste the password from the previous cat output)
    CREATE USER 'username'@'localhost' IDENTIFIED BY 'password'; CREATE DATABASE your_dbname DEFAULT CHARACTER SET utf8 COLLATE utf8_unicode_ci; GRANT ALL PRIVILEGES ON your_dbname.* TO 'username'@'localhost'; FLUSH PRIVILEGES; quit;
  6. sudo apt install php libapache2-mod-php php-mysql php-gd php-xml php-mbstring
  7. By default apache will look at /var/www/html location for your WordPress install, but you can modify it with these steps
    sudo nano /etc/apache2/sites-enabled/000-default.conf
    in this example we will change DocumentRoot line to be /var/www/wordpress
  8. Optional: if you want SSL support add this entire block<VirtualHost *:443>
    ServerAdmin webmaster@localhost
    DocumentRoot /var/www/wordpress
    SSLCertificateFile /etc/ssl/certs/ssl-cert-snakeoil.pem
    SSLCertificateKeyFile /etc/ssl/private/ssl-cert-snakeoil.key
    </VirtualHost>
  9. cd /var/www
  10. sudo curl -O https://wordpress.org/latest.tar.gz
  11. sudo tar xfvz latest.tar.gz
  12. sudo cp wordpress/wp-config-sample.php wordpress/wp-config.php
  13. sudo nano wordpress/wp-config.php
  14. Modify database_name_here, username_here, password_here
  15. sudo chown -R www-data:www-data /var/www/wordpress
  16. Allow .htaccess permissions in Apache2 (otherwise changing the Permalinks settings in WordPress will result in 404 errors, as well as plugins that rely on subfolders to serve content).sudo nano /etc/apache2/apache2.conf
    Find the section where Directory parameters are specified and add the following block:
    <Directory /var/www/wordpress/>
    Options Indexes FollowSymLinks
    AllowOverride All
    Require all granted
    </Directory>sudo a2enmod rewrite
  17. If you need to adjust maximum upload filesize and post size for PHP it is found in /etc/php/7.2/apache2/php.ini
    Then change upload_max_filesize and post_max_size
  18. sudo systemctl restart apache2
  19. Done

Suddenly Can’t Connect to UniFi Controller on Windows Server

Specific setup was Windows Server 2012 R2 and UniFi Controller 5.12.35.   The issue was that suddenly neither internal connections (LAN/private) nor external WAN (public/WAN) connections  could access the controller.  If Windows Firewall is enabled, the UniFi controller needs two apps allowed: UniFi DB Server and Java.

UniFi DB Server default location is
C:\Users\xxxx\Ubiquiti UniFi\bin\mongod.exe
where xxxx is the username

Java (32-bit) default location is
C:\Program Files (x86)\Java\jrex.x.x.x_xxx\bin\java.exe
where jrex.x.x.x_xxx is the folder name. This folder path changes depending on the version number of Java Runtime Environment installed.

The root cause was that Java was updated on the system but a new rule was not automatically created for it in Windows firewall. Upon inspection there were several rules for Java already present in the firewall but none were for the most recent version.

To check, navigate to Control Panel – Windows Firewall then choose the option for Allow an app or feature through Windows Firewall.

Find Java and then click the Details button. Here you can check if the path to java.exe matches the version that is installed.  You can manually add the new version by using the Allow another app button.

Once allowed check to see if the controller can be accessed again.

Crossflash Dell 0WFN6R 9341-8i to LSI 9300-8i IT Mode

These are the steps to crossflash a Dell 0WFN6R (SAS9341-8i) to an LSI 9300-8i. At the time of this guide the latest firmware available is P16.

All files needed for this guide can be downloaded here. The firmware and BIOS files were sourced directly from Broadcom’s website (Installer_P16_for_UEFI.zip and 9300_8i_Package_P16_IR_IT_FW_BIOS_for_MSDOS_Windows.zip specifically).

For UEFI method you will use sas3flash.efi.  You can perform this same procedure with BIOS method by instead using sas3flsh.exe. However if in BIOS mode you receive ERROR: Failed to initialize PAL. Exiting Program, then you must switch to the UEFI method.

  1. Make a record of the Assembly number and SAS Address from the stickers on the back of the card
  2. Create your bootable USB disk with Rufus, formatted as FreeDOS.  Extract the files from this guide to the root of the drive.
  3. Place jumper on TP12 located on the front rear of the card near the two SAS ports. Otherwise you will receive the error: No Avago SAS Adapters found! Limited Command Set Available! when trying to use SAS3Flash.
  4. Boot from the USB disk either UEFI or BIOS. For BIOS method substitute sas3flsh.exe for sas3flash.efi in all steps below.
  5. Navigate to the SAS3Flash binary on the USB drive
  6. Confirm the the 9341 card is detected:
    sas3flash.efi -list
  7. Perform preliminary flash of the firmware:
    sas3flash.efi -noreset -f SAS9300_8i_IT.bin
  8. Once you receive a confirmation that the flash was successful, power off the system and remove the jumper. Reinstall the card and boot off the USB drive.
  9. Wipe the card :
    sas3flash.efi -o -e 6
  10. Flash the firmware:
    sas3flash.efi -f SAS9300_8i_IT.bin
  11. At this point you can stop if you don’t want any BIOS on the card.  It is needed if you want to boot from a drive attached to the card.
  12. Flash the BIOS:
    sas3flash.efi -b mptsas3.rom
  13. Flash the UEFI rom:
    sas3flash.efi -b mpt3x64.rom
  14. Program the SAS address (don’t include hyphens as they will be added automatically): Note – you can perform this later at any time.
    sas3flsh.exe -o -sasadd XXXXXXX
  15. Program the board assembly (you DO need to include hyphens with this):
    Note – you can perform this later at any time.

    sas3flsh.exe -o -assem XXXXXXX
  16. Verify your results:
    sas3flash.efi -list
  17. You should see your SAS address, firmware version 16.00.10.00,  BIOS version 08.37.00.00, UEFI BSD Version 18.00.00.00 and your board assembly.  Crossflashing is now complete.

Aquantia AQC108 No Network Status LEDs

Recent experience with an Aquantia AQtion AQC108 5G network card that was integrated in a motherboard (Supermicro X11SRA-F).    Plugging in an ethernet cable would not activate the port (status LEDs would not light up on either the NIC or the switch), so the NIC appeared dead.  However when booting into ESXi 6.7 the NIC would be detected as AQC108 NBase-T/IEEE 802.3bz Ethernet Controller [AQtion] but not be listed under Networking – Physical NICs indicating that no driver was found.  Turns out this NIC needs an OS that has a driver installed before the LEDs will activate. For example with the ESXi host machine the NIC was set up as Passthrough to a guest running Windows Server 2019 (which has the drivers built in).  The link LEDs then began working and the NIC functioned normally in the Windows guest.