Thursday, September 28, 2023

Yoast Bug Gantry Template In WordPress

In a blog I work on I started getting errors when users clicked on the blog title.  The full error is:

Fatal error: Method Timber\FunctionWrapper::__toString() must not throw an exception, caught TypeError: Argument 1 passed to WPSEO_Admin_Bar_Menu::get_post_focus_keyword() must be an instance of WP_Post, instance of Timber\Post given, called in /home/scdadmin16/public_html/blog/wp-content/plugins/wordpress-seo/inc/class-wpseo-admin-bar-menu.php on line 204 in /home/scdadmin16/public_html/blog/wp-content/cache/gantry5/g5_hydrogen/twig/96/96aca6301dc11bbb5234da96587e2f18dbe5b513750ada3a3e16c3299489a720.php on line 0

A Google search lead me to the following page which says it is a Yoast issue and will be resolved in the 8.1 update from Yoast.

https://github.com/gantry/gantry5/issues/2347

I hope this helps someone else out there…

 

WordPress Divi Footer From Search Engines Yoast

Working on new WordPress site using the Divi theme. I had found a video on creating a custom footer by creating a page and that page becomes an element you can save in your Divi library to be reused. I made a footer and added to each page.

The problem came when I was reviewing the analytics after a month. “Footer” was one of the pages listed by Google and indexed by Google.

I discover that I can disable search engines from tracking the Divi Elements / Pages. Go to that element / page. In my case it was the “Footer” element. This element is a page built with the Divi builder. This is what it looked like.

At the top of the page is my Yoast settings. There are 3 tabs on the left side. Click on the gear icon and you will see where to turn this off.

 

I hope this helps someone else out there….

 

 

ChronoForms ChronoConnectivity 5 Example

The real benefit to Chronoforms is it is FREE.

I start with installing both ChronoForms and CronoConnectivity from Chronoengine. Go into Chronoforms and create a form. I started one here for customers. I wanted to keep their name, website, and password list. I started with a form called Customers.

After the designer elements of the form were finished  I did not go into set up yet. I went back to the “Forms Manager”, checked the “Customer” form and hit “Create table”. I ended up using the standard setting.

Now I go back into the form and add a couple of pieces to the “Setup” tab. In the “on load” section add “HTML (Render Form)” and “on submit” area add a “DB Save” from the Data Management elements.

You will now be saving the data to the database.

In ChronoConnectivity click “New” credential Manager. I am calling mine “customeredit”.  The Connection Name I called “customeredit”, and set published to “yes”.

Next click on “Models” and enter a new Model. I titled mine “customered” for customer edit. Use the dropdown to select the table where you stored the data from the form.

On the “Front List” tab Click on “Settings”. Select the display type as “Table”. The “Columns list” is the how the data is displayed when it is returned. The breakdown of the columns list is this:

customered.domain.DOMAIN = the model name . the database column name . the heading of the column ( you can make these up.)

The “Sortables” allows this column to be sortable once it is displayed.

On the “Actions” tab click “edit”. The form event will be the name of the form and the action. I called mine “CustomerEdit” and the action is “:load”. I don’t have this form created yet so we will do that next.

Before we leave this connection we need to set it permissions and that is to make the “view” allowed for the public so we can see it.

Go back to Chronoforms, check “Customer” our original form and hit the “Copy” button. Rename this copy “CustomerEdit”. This is what the the “Form event” is looking for.

Go into the form “CustomerEdit” and click on “Designer”

Click on the “Edit” button and set the “Field Name” and the “Field ID” for this “First Name” element to be “customered[firstname]”. This will tie the data coming over to this form together, so the firstname parameter will fill in the “firstname” field. Do the same with the rest of the elements. I also put a hidden field to collect the ID number.

Next go to the “Setup” tab. Add a “HTML (Render Form) element in the “On load” section. From the “External Apps” menu drag a “Connection Action”

Lastly add the name of the connection from ChronoConnectivity. I used the name “customeredit”. The Connection action is “save”.

You can create a menu item for the Form and the Connectivity View to see it all in action .

I will upload a zip file with the forms, connection, and database extract so you can use what I have working. It is easy to take my form and “Restore” it to your Chronoform and do the same thing with the Chrono Connection. The database table is easy to import a single table, and in my zip I have just the one table.

chronos_example_full

I am working on a Chronoform / Connectivitiy version 6 tutorial. Version 5 wasn’t easy to understand and version 6 is looking to be just as complicated. Version 6 does handle the database input better.

I hope this helps someone else out there…

 

WAMP Server Reset Root Password

I recently wanted to install Joomla 4 Beta and discovered I need PHP 7 or higher. I am running XXAMP and only PHP 5.6. I also have WAMP installed and have a bunch of sites started in there. My WAMP would start; however, the sites couldn’t connect to the database.

I looked in the “C:\WAMP\apps\myphpadminX.X.X\config.inc.php” file and the password was what I thought it was. I tried a bunch of things including using the MySQL Console but this article got me working again.

https://stackoverflow.com/questions/29070501/regaining-access-to-lost-mysql-password-for-phpmyadmin-on-wamp

The lines in my “wampserver >> MySQL >> my.ini” file in the looked like this:

# The MySQL server
[wampmysqld]
#skip-grant-tables

I assumed the “#” was a comment so I removed it. I didn’t have to add it. It looked like this:

# The MySQL server
[wampmysqld]
skip-grant-tables

Restarted everything and I could log into PHPmyAdmin and all the sites were now connecting.

I hope this helps someone else out there…

 

Firefox Turn Off Google Tag Manager Preview

I recently added Google Tag Manager for a customer and in experimenting I added to my company website. Now in FireFox I am getting a preview pane at the bottom of the page. In Chrome this can be turned off, but I couldn’t find how to do in Firefox till I found the following article.

https://www.shoutmeloud.com/disable-google-tag-manager-preview-pane.html

The basics for this are:

  • Log in to Google Tag Manager.
  • Go to your site dashboard (Workspace < Overview).
  • Click on the option that says Leave Preview Mode.

I hope this helps someone else out there.

Google Tag Manager In Gantry 5 Hydrogen

Was asked by a customers marketing company to add Google’s Tag Manager to their clients website. I wasn’t currently using Google’s Tag Manager, so I decided to look into and apply to my site running a Gantry 5 Hydrogen theme.

I tried just adding it in the “Settings” section of my template. The “before body” portion worked; however, the code for the head section was showing up on the page and not hidden.

A quick Google search lead me to this page where someone built an Atom to handle this.

https://translate.google.com/translate?hl=en&sl=fr&u=https://www.en-toutes-lettres.fr/services-web/joomla-news/358-google-tag-manager-sur-gantry5&prev=search

This Atom was awesome. I had to use it both the home and default. They suggest just putting in the base outline, but that didn’t work for me.

I hope this helps someone else out there….

 

WordPress Akeeba – Ajax Loading Error

I was restoring a WordPress website using Akeeba kickstart in my WAMP environment. I got the following error.

I moved over to XXAMP I got site installed; however, my SendMail isn’t set up in XXAMP so I couldn’t test the forms. I wanted to restore the site in WAMP.

Ran the Akeeba Kickstart again and this time I choose to run the files restore “directly” and “ignore most errors”.

The website installed, but while working on the site I discovered a lot of odd things. None of my Widgets or Widget positions were available in the dashboard.

I ran the install again, but this time I did not check “Ignore most errors”. This is installed correctly this time.

I hope this helps someone else out there…