Categories
Fixing Stuff Samuel

auto trader theme fixes

to fix the pricing issues upload my local copy of the following:

taxonomy.php
this is the code:

template-search.php
this is the code:

promo_offer.php
(theme_config/extensions/shortcodes/shortcodes), this is the code:

' . $out .'

special_deals.php
(theme_config/extensions/shortcodes/shortcodes), this is the code:

' . $out . '

Let us know if you need more assistance.

side-right.php located in offer-views folder.

Categories
Fixing Stuff

Fixing WooCommerce Error

I was having the following error today on a woocommerce enabled website:

Division by zero in woocommerce/content-product.php on line 33

To Fix this issue:

1.) Navigate to Appearance > customize > section Woocommerce
2.) Change the selected column amount, grid style, and products per page.

*really just changing one will work, then save. This change is all you need to do, you can even change back to the original layout, woocommerce just needed to be saved in a different format.

Categories
Fixing Stuff

Great repair vid on cleaning furnance flame sensor

With it getting cold out, the furnace in my rental unit starting malfunctioning. It would cycle on, burn for about 5-10 seconds and then cycle back off. Typically when this happens the flame sensor is dirty and is causing the furnace to cycle on/off. The reason this happens is when the flame sensor is dirty it does not property detect that the furnace is on. It then sends a notice back to the furnace motherboard reporting that the furnace is not on. This causes the motherboard to cycle the furnace to try and “turn it on” which in turn causes the never ending power cycle loop.

Link too Good video explaining how to clean a furnace flame sensor.

Categories
Fixing Stuff Samuel

Fixing FlashFXP Site Import Error

If you are like me and just re-formatted your computer and are getting the following error from FlashFXP never fear I just found a fix and its pretty simple. Error in question:

An Unexpected error occured while saving your application data. Your Changes have not been saved. Please restart FlashFXP. E2 = C:\ProgramData\FlashFXP\5\schedule.dat

flashfxp-error

To fix this error do the following:

1.) open up my computer and navigate to C:\ProgramData\FlashFXP\5\ (please note the folder ProgramData may not be visible, it was not on my computer. Just type it directly in the nav bar to get there).

2.) delete the file schedule.dat (do this when flash fxp is closed)

3.) open up flashfxp, the file should be re-generated and the error message should no longer pop up.

Categories
Fixing Stuff Laravel Samuel

combining css and js files into 1 http request

install gulp onto the server:

1.) upload the files (gulpfile.js) and (package.json) into the root directory of the site (make sure to update file paths to the correct css and js directory’s first)

2.) ssh into the server and run: npm install, do this in the same root directory you just uploaded both files to. (if this errors out just manually upload all needed node_modules files to the root directory)

3.) make sure the node_modules directory and all sub directory can execute files (chmod +x directory_name -R)

4.) execute the combining script to combine all the js and css files (./node_modules/gulp/bin/gulp.js) must be run from root directory of site or else will fail

5.) change out the javascript and css script files to the new combined file for each

If all went according to plan you now limited your css and js files down into 1 http request respectively and minifid them both.

general notes:

if you upload a new file or edit a file in the css or js directory you have to ssh into the server and run:

./node_modules/gulp/bin/gulp.js

*this generates the new combined file
*would be a good item to add to a deploy script

If the page errors out (or white screens of death) explcitly define the order of the js files in your gulpfile.js. What most

Categories
Fixing Stuff Samuel

Setting up and using rsync on 2 external machines

This post is just some notes as I learn how to utilize rsync between 2 servers that are on separate networks. rsync is ideally suited for this task because it will only transfer files that have changed instead of blindly transferring all files and wasting bandwith (which seems trivial but if you are using this to power website backups for example, that will mean the difference of transferring your entire site vs transferring only files that have been changed)

1.) Create your rsync shell script, example script below:
rsync -avz /path/to/back/up/files/on/server/ username@host.com:/path/on/your/backup/machine/

2.) Upload the file to the machine that you will be pushing from (make sure to make it executable by running chmod +x on the file after uploading it)

3.) SSH into the machine and test the command by running ./filename

If all goes well your machine will connect and if its the first time it will ask you to verify the fingerprint of the external machine, type yes and hit enter. Your off to the races, to automate this script simply create a cron job to execute the shell script at whatever interval you like.

Troubleshooting:

If you are having trouble establishing the connection here are some things to try:

1.) make sure you are using the correct port (22 is the default ssh port, but its a good idea to not use this port for added security so if you need to add another port then update your command to:
rsync -avz -e 'ssh -p port#' /path/to/back/up/files/on/server/ user@host.com:/path/on/your/backup/machine/

2.) If your connection is timing out you can test it by running:
ssh user@host.com -p port#

or by running

telnet host.com port#

If both of these test connections are displaying time out errors to you, then there is a firewall issue on your host machine preventing the connection from routing correctly to your backup machine.

3.) If you can’t get the script to connect, just try to manually SSH into the external machine first. You will either run into the improper port being open, or the SSH auth is not allowed in freenas on the machine.

Troubleshoting the actual rsync:

1.) If the rsync command generates a weird folder on the external machine do ________
2.) If the rsync command won’t sync files from the external machine onto the local machine do _______