What is the tutorial about?
Bulk import data into the JetEngine Glossary is the focus of this tutorial. We’ll explore how to manually import multiple entries into the JetEngine Glossary, a feature currently not provided by Crocoblock. This process is particularly useful when you have a list of items, such as countries, that you want to add to your glossary.
Steps to Bulk Import Data into JetEngine Glossary
- Navigate to the JetEngine Dashboard
Go to your WordPress dashboard, then to the JetEngine dashboard. From there, navigate to Glossaries. Currently, you have to add each glossary item manually. - Create Dummy Entries
Create a few dummy entries in your glossary. This will help you understand the structure and schema of the data. - Check Your MySQL Database
Go to your MySQL database. You should see a table with a post type called “glossary”. - Understand the Data Structure
Notice that the data in the database is stored in a serialized PHP object. This is a way of storing complex data structures, like multi-dimensional arrays, in a format that can be easily stored and retrieved. - Prepare Your Data
Open Excel and create three columns: “value”, “label”, and “is_checked”. The “value” and “label” columns should contain the same data, while the “is_checked” column should contain zeros. - Convert Your Data
Copy your data and paste it into a tool like Mr. Data Converter. Choose the PHP output option to get a multi-dimensional array of your data. - Serialize Your Data
Copy the array and use an online PHP scripting tool like the one provided by W3Schools to serialize the array. This will give you a string that can be stored in your database. - Update Your Database
Copy the serialized string and replace the existing value in your database. - Check Your Glossary
Go back to your WordPress dashboard and check your glossary. You should see all the new entries. - Use Your Glossary
To use your glossary, create a new form in JetEngine. Add a select field and choose your glossary as the source.
Benefits of the Tutorial
This tutorial provides a workaround for bulk importing data into the Crocoblock Glossary, a feature not currently available. It streamlines the process of adding multiple entries, saving you time and effort. Moreover, it gives you a better understanding of how the glossary works and how it interacts with your MySQL database.
Use Cases for this Tutorial
- Creating a country selector in a registration form.
- Importing a large list of terms into your glossary.
- Migrating data from another platform into your WordPress glossary.
Troubleshooting Common Issues
While the process of bulk importing data into the Crocoblock Glossary is straightforward, you may encounter some issues along the way. Here are some common problems and their solutions:
Issue 1: Data Doesn’t Import Correctly
If your data doesn’t import correctly, it could be due to a formatting issue in your Excel file. Make sure that your data is correctly formatted and matches the structure of your glossary. Check for any missing or extra columns, incorrect data types, or improperly formatted dates. If necessary, adjust your data in Excel and repeat the conversion and serialization process.
Issue 2: SQL Command Errors
Errors in your SQL command can prevent your data from being imported. If you’re seeing SQL errors, double-check your command for any syntax errors. Make sure that your table name is correct and that you’re using the correct functions for the NOW() and NULL fields. If you’re still having trouble, consider using a tool like Mr. Data Converter to ensure your data is correctly formatted for MySQL.
Issue 3: Data Not Showing Up in WordPress
If your data imports successfully but doesn’t show up in your WordPress dashboard, it could be a caching issue. Try clearing your WordPress cache and refreshing your dashboard. If the data still doesn’t appear, check your glossary configuration to make sure it’s set to display the correct fields.
Issue 4: Permission Issues
If you’re having trouble accessing your MySQL database or executing SQL commands, it could be a permissions issue. Make sure that your user account has the necessary permissions to access the database and modify the glossary table. If necessary, adjust your database permissions or contact your hosting provider for assistance.