FOR IMMEDIATE RELEASE
Late last night, there was a report that came in from an anonymous caller stating that the website was not working correctly when trying to connect to web pages from the social media posts. After some exhausting troubleshooting, we were able to re-create the reported issue and the entire web development and programming team was called into the office to come up with a solution.
From what we can tell, Facebook has started adding a parameter to the end of the URL's when a visitor clicks on the link in Facebook, which then re-directs to the website. This additional ?fbclid=###### was causing the website to not load the department related images correctly and would throw off the layout of the website.
Also, certain elements on the site would not work as well, such as the correct logging of the social media share counts, and loading the code needed to display slideshows. Last week one of our developers had noticed that the images within the footer of the page was not being displayed correctly, but they were not able to duplicate the problem. Thinking that this may have been just a random glitch, it was not pursued.
Another problem was coming from Twitter, where an added "/" was being added to the URL causing the same issues.
Why these social media sites were adding this additional information to the end of the URL that we explicitly declare within the heading of the pages is unknown. We reached out to both social media companies, and no one was available for contact or support. WE HAD TO GET THIS RESOLVED, and quickly.
This was a major issue since most of our visitors from the lower 48, would connect to the website from links that are being put out in social media. When they would first come to the site, most of the layout was not loading correctly.
The website has a built in re-direct system that will redirect the visitor to the appropriate section on the website based on the URL. Within this redirection system we were able to add a few lines of code that would:
After a few hours of testing out the solutions, the division is confident that we have fixed the glitch and this issues are now resolved.
The following is the code that the team came up with that fixed the issue. We are providing the code here in case anyone else might be experiencing the same issues with their website. This code needs to be added in your re-direction script.
The first two lines will remove that additional parameter added to the URL, and the second two lines will remove the added "/" at the end of the URL. (A huge thank you to Alex - one of our programmers - for setting up a test server and spending hours developing this code. Without his efforts this issue would have not been resolved. Alex will be recommended for a Golden Candy-Cane Award).
RewriteCond %{QUERY_STRING} ^(.*?)(&?fbclid=[a-zA-Z0-9_-] )$
RewriteRule ^(.*)$ /$1?%1 [L,NE,R=301]
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)/$ /$1 [L,R]
The team also found an issue with the Naughty/Nice database last night. Something had changed with the coding of the database; whereas, when someone would initially search their name, the result would be be blank. When they would come back and search their name the second time, the problem did not exist.
This has been resolved, and we recommend that everyone check their status as soon as possible and let us know if they see anymore issues. We have found none at this time.
Gracey Kimble, would like to thank the entire team for coming together in the middle of the night to get this all addressed and resolved. She will be providing lunch today in the staff room for everyone, please be sure to stop by and get some food!