Rob Kraft's Software Development Blog

Software Development Insights

Archive for the ‘I.T.’ Category

Trello Removes Feature for Creating Personal Board – A Setback From Their Atlassian Acquisition

Posted by robkraft on February 10, 2021

I discovered today that Trello no longer supports personal boards.  When you create a new board you need to create it within a Team first (teams will be renamed workspaces).

You can get around this by just creating your own team, perhaps name your team Personal.  But I see this as the first of many steps where Atlassian is re-purposing a popular tool for personal time management into a product optimized for users of other Atlassian products.  It is sad when a good product is acquired by another company then altered for different end users.

As I suspect more changes in the future, probably even pricing related, I am hunting for alternatives to Trello now.  There is a good list of some in this article:  The 17 Best Trello Alternatives in 2021 (In-Depth Comparisons) (kinsta.com)

Asana and Wrike are a few good alternatives.

Here is Atlassian trying to put a positive speed on their product degradation: Why can’t I create a board outside of a team anymore? – Trello Help

Posted in Project Management, Web Sites | Leave a Comment »

Forcing dynamic content to render Client-Side on a Netlify Gridsome SSR Vue Site

Posted by robkraft on January 19, 2021

I inherited a site build on Netlify using Gridsome and Vue Server-Side Rendering (SSR).  The site is pretty good.  It loads very fast and the content is easily maintained by people that are not programmers.  However, we occasionally want to embed a form from another site, such as OpenForms.com, and that is challenging.  The idea behind Vue SSR is that the server will render and load ALL the content then provide it to the browser, and trying to run JavaScript on the client is challenging because traditional events used by SPA and web page JavaScript programmers don’t fire.

Furthermore, the Gridsome CMS uses Markdown for web page content, but the ability to place HTML and JavaScript in these pages is limited.  I battled for days to create a solution and am sharing how I made it work.  I’ll admit it may not be the best solution; please let me know if there is a better way; but this solution works robustly.

Step 1: In the Gridsome MarkDown page, add the anchor tag that links to your form as provided by OpenForms.  Something like this:

<a class="openforms-embed" href="https://us.openforms.com/Form/{your form ID here}">Click here to view form.</a>

I did not include the script tag to load the JavaScript here because it won’t load reliably here, so I load it elsewhere.

Step 2: On the Vue page that renders the MarkDown page from Step 1, add code in the mounted() and updated() events. (The console.log is not necessary, but I use it to help me understand what is going on.)

export default {
   mounted() {
     console.log("mounted basic: " + window.location.pathname);
    evalScripts()
    
  },
  updated() {
    console.log("updated basic: " + window.location.pathname);
    evalScripts()
  },

Step 3: The important piece is calling the evalScripts() method I wrote which is this:

function evalScripts() {
  //This SeamlessOpenForms is specific to USOpenForms to get an openform to render every time 
  //the page is refreshed or viewed.
  if (typeof(SeamlessOpenForms) != 'undefined')
  {
      SeamlessOpenForms.loadOpenForms();
  }
  else {
      const openforms = document.querySelectorAll(".openforms-embed");
      if (openforms.length>0)
      {
        console.log("missing SeamlessForms: " + window.location.pathname);
        const scriptPromise = new Promise((resolve, reject) => {
          var scriptElement = document.createElement('script');  
          document.body.appendChild(scriptElement);
          scriptElement.src = 'https://us.openforms.com/Scripts/embed-iframe.js';  
          scriptElement.onload = resolve;
          scriptElement.async = true;
        });
        scriptPromise.then(() => { SeamlessOpenForms.loadOpenForms();});
    }
  };
}

I will attempt to explain what I think is going on with USOpenForms and the code above.  First of all, this code is risky because I reviewed the JavaScript in https://us.openforms.com/Scripts/embed-iframe.js provided by OpenForms to figure out what to do here, and it is very possible that OpenForms will change their JavaScript and what I am doing here will no longer work (our fallback is to put this in an Iframe, but that causes two vertical scroll bars).

When the JavaScript file (embed-iframe.js) loads it executes and looks for any anchor tags in the DOM with a class of .openforms-embed.  If it finds an item with that tag, it uses the src property to pull in the form and render it within the current page.  However, if a user navigates first to another MarkDown page, based on the same Vue Page, the embed-iframe.js looks for those anchor tags on that MarkDown page and does not find them.  When the user navigates to the MarkDown page containing the anchor tag, the embed-iframe.js does not load and run to look for anchor tags because it already did so when the first MarkDown page for that Vue component loaded.

The script above, gets called by either the mounted() or updated() event, one of which will fire every time a MarkDown page is loaded or refreshed.  The script will render the OpenForm via SeamlessOpenForms.loadOpenForms() if the JavaScript to do so is already loaded, but if not it will dynamically load that JavaScript, then perform the render code (SeamlessOpenForms.loadOpenForms();)

FYI – Here is a simple example of loading the form in an IFrame, which is what we did initially in the MarkDown until I got the embedded form JavaScript to work.

<iframe height="600px" width="100%" style="border:none;" src="https://us.openforms.com/Form/{your form id}"></iframe>

The explanation:

In the Gridsome/Vue SSR architecture, some window/DOM events only fire when the first web page (the first MarkDown page) based on that Vue Page is loaded.  So if you have dozens of MarkDown files that all use the same Vue Page (such as BasicPage.Vue), some javascript methods and Vue events only run when the first MarkDown page based on the Vue Page is loaded.  But the mounted() or updated() events always fire when a MarkDown page is loaded, rendered, or refreshed.

Posted in Coding, Web Sites | Leave a Comment »

How To Fix Scaling Problem for High DPI PC Running Kali Linux

Posted by robkraft on March 11, 2020

I couldn’t find any posts on the web telling me the best way to fix this problem so I am sharing my solution here.

The problem I experienced is that I downloaded Kali Linux to run in VMPlayer on my High DPI Windows 10 machine but the guest font and screen is too small and hard to read to be really usable.  VMPlayer doesn’t have any settings to fix this, but you can change the VMPlayer.exe settings in the Windows host OS to fix it.

Find your VMPlayer.exe, probably in a folder like C:\Program Files (x86)\VMware\VMware Player.  Right-click on it, select Properties, Compatibility Settings.  Then click on the “Change high DPI settings”.

I checked the checkbox labeled “Use this setting to fix scaling problems for this program instead of the one in Settings”.

I also checked “Override high DPI Scaling behavior.  Scaling performed by System”.

When I restarted VMPlayer and opened Kali Linux, the UI was much more functional and usable, once I opened it full screen.

Posted in I.T. | Leave a Comment »

Free Tool from F-Secure To Check If Your Password Was Compromised

Posted by robkraft on March 11, 2020

F-Secure has an easy online tool you can use to find out what sites leaked your email address, password, and other information.

The URL is: https://www.f-secure.com/en/home/free-tools/identity-theft-checker

F-Secure is a site I trust and recommend.  Just enter your email address and within minutes you will receive an email with information about each breach your email address was part of.

F-Secure has other tools at https://www.f-secure.com/en/home/products#free such as a tool to show your IP address, a tool to check your router for flaws, and an online virus scanner for your PC.

Posted in Home Tech, I.T. | Leave a Comment »

Asp.Net Core – HTTP Error 500.0 – ANCM In-Process Handler Load Failure

Posted by robkraft on October 30, 2019

I spent a few hours trying to fix this problem today.  What I thought was strange was that one web site loaded and worked fine, and another web site, on the same server using the exact same files did not work.

Our fix turned out to be somewhat simple.  You can only have one Asp.Net Core module running in process per IIS App Pool.  We have long been sharing an app pool with several web sites.  I guess as we migrate to Asp.Net Core running on IIS, that we will need to create a separate App Pool for each site.

I figured this out by reviewing the Event Viewer Application logs.

“Only one inprocess application is allowed per IIS application pool. Please assign the application ‘/LM/W3SVC/1/ROOT/Nightly/SQL2012/LucityDocumentServerCore’ to a different IIS application pool.”

Eventi ID 1008

 

  • HTTP Error 500.0 – ANCM In-Process Handler Load Failure
  • The specified version of Microsoft.NetCore.App or Microsoft.AspNetCore.App was not found.
  • The in process request handler, Microsoft.AspNetCore.Server.IIS, was not referenced in the application.
  • ANCM could not find dotnet.
  • failed to start application iis aspnetcore module v2 0x80004005

Posted in I.T., Web Sites | Leave a Comment »

How To Activate Function Key Lock On Your Lenovo Yoga

Posted by robkraft on June 14, 2019

This post is primarily for myself to find the answer when I need to change the default way function keys behave on my Lenovo computer again.

To do this, launch the “Lenovo Vantage” app in Windows 10.  From there select “Hardware Settings” and then “Input”.

LenovoVantage

Selecting the highlight option will cause your function keys to behave like most software programmers expect them to behave.  Very helpful for a developer like myself that is used to using F8 and F10, not to mention all the helpful Windows function keys:

https://www.computerhope.com/issues/ch000306.htm

Posted in Home Tech, I.T., Uncategorized | Leave a Comment »

I Was A Victim of Microsoft’s Attempt to Fix Meltdown and Spectre

Posted by robkraft on April 15, 2018

If you’ve come here hoping for a rant against Microsoft, prepare to be disappointed.  Microsoft released a patch on January 5th, 2018 to attempt to fix Meltdown/Spectre problems.  That patch prevented one of my computers from booting after it was applied.  I am not upset with Microsoft for causing this problem while attempting to fix another program because I understand that fixing some problems are really difficult, and what works on one CPU may not work on another.  Fortunately for me, the computer affected by this patch was a computer I do not use often.

Unfortunately, this is a problem that would cause most people, anyone that does not consider themselves pretty good at fixing computer problems, from using the computer until they took it to someone else for repair.

Today I sat down to fix the computer.  The computer runs Windows 7.  The computer failed to boot on January 11th, 2018.  I discovered the boot failure a few weeks later and then discovered that I could not even enter Windows Safe Mode after rebooting the PC.  Knowing it would take some time to resolve the problem and that I might have a corrupt hard drive and never be able to resolve it, I put an attempt at resolution on hold.

Until today.

I used a Windows 10 bootable jump drive I already owned.  My HP machine allows me to press the ESC key to get to the “Boot Menu” and from there I could select the Jump Drive.  I chose to go to the command prompt.  From there, I found my C: drive (which was named E: in this boot) and found that all my backup files still existed.  I breathed a small sigh of relief then searched (dir /od) looking to find when the PC last successfully booted (which was January 11th), and I looked for an explanation of the problem by looking for what last happened on the machine.  I saw that Windows Update had activity just prior to the failure.  I then searched the Internet from another computer and quickly found the exact article I needed to fix the problem.

https://www.sevenforums.com/general-discussion/412283-windows-7-wont-start-after-update-5-jan-2018-a-2.html?s=059ef7f74b20ace7ea26687e027217b2

I used the information in the January 8th post by Wolfie1307 to run the following command and the command told me it succeeded (meaning that it successfully rolled back the attempted Windows Update).

dism /image:E:\ /remove-package /packagename:Package_for_RollupFix~31bf3856ad364e35~x86~~7601.24002.1.4(or whatever you copied) /norestart

It did not work for me on my first attempt because I was lazy and used the exact package name that Wolfie1307 provided in his/her post.  I needed to change the package name to include x86 instead of amd64 for mine to succeed, and I found the name of that package in the WindowsUpdate.log

I rebooted my computer and it is working again!

 

 

Posted in Home Tech, I.T. | Leave a Comment »

Ending Net Neutrality Will Cost You!

Posted by robkraft on December 3, 2017

23905246_1764216676942296_1922093923842125536_n

Posted in I.T. | Leave a Comment »

iTunes 12.7 Problem – Podcasts missing from Library

Posted by robkraft on October 22, 2017

It seems that most iTunes Upgrades either cause problems or remove features I use for managing the podcasts I listen to and 12.7 was no different.  This one took me an hour to resolve.  Unfortunately Apple has no information about this on their site and it is not easy to submit or get responses to support requests.  But I found the answer on another blog: https://appletoolbox.com/2017/09/apple-releases-new-itunes-12-7-what-you-should-know/#Where_Are_My_Podcasts

I am reposting the resolution on my blog in case I need to again, and maybe to reduce the time it takes for others to resolve the problem.

Posted in Home Tech, Uncategorized | Leave a Comment »

Is 2016 the Year to Stop Bundling Javascript and CSS?

Posted by robkraft on December 13, 2015

If you don’t stop bundling your javascript and CSS in 2016, you will probably do so in 2017 or 2018 and the reason for this is the implementation of HTTP2. HTTP2 is a new spec to replace HTTP and requires changes in both browsers and the web servers they connect to. Once each side of the communication supports HTTP2, the improved communications can begin using the new spec. Going into 2016, most major browsers such as Chrome, Firefox, and Edge support it; but I am not sure about IE11.

HTTP2 is not a rewrite of HTTP, but an alteration of a few features. One of the most notable is the ability for the browser to bundle multiple requests together to send them to the server. This is why developers should consider ending the use of bundling javascript and CSS on the server, as it may provide worse performance to clients running HTTP2. For a good podcast about the impact of HTTP2, I recommend show 1224 of .Net Rocks: http://www.dotnetrocks.com/?show=1224

Developers should keep the following in mind regarding HTTP2:

  • Bundling of javascript and CSS may provide worse performance than not bundling for clients using HTTP2.
  • Communications that are not using HTTP2 will still benefit from bundling.
  • Some browsers, notably Chrome and Firefox, may only support HTTP2 when the connection uses TLS/SSL.
  • Proxies in between the client and the server that don’t support HTTP2 may also affect the improvements HTTP2 would otherwise provide.

For a little more about the spec, I recommend this concise post from Akamai: https://http2.akamai.com/. And don’t overlook their awesome demo example of the improvements HTTP2 can provide: https://http2.akamai.com/demo.

Posted in Coding, Dev Environment, I.T., Uncategorized, Web Sites | Leave a Comment »