Trying to add content presents an AJAX error similar to the following:
Copying content from external sources, such as MS Word, can sometimes cause issues with our code as it tries to insert invalid characters. This can be due to the font used, or special characters that looked fine in Word, but presents a problem when copied over.
To locate problematic or invalid characters, complete the following:
- Using Google Chrome (if Chrome is not available, Internet Explorer or Firefox with Firebug should work), open dev tools using F12 on your keyboard (If in IE, you can click on the cog wheel and 'F12 Developer Tools' appears in the menu)
- Select the Network tab
- Refresh the page encountering the AJAX error that says '200 OK' for the status.
- Select the 'response' option for the entry showing 200 and review the full code provided here. Usually it will be for a .cfc file (app.cfc or widget.cfc) Provide this data to the support team. See the following image for what this may look like (i.e. lots of text, which will help locate the invalid character):
The steps below are advanced. If you require help, please reach out to the Support team.
- In your browser, open a new tab using http://jsonlint.com/
- Copy and paste the entire response code provided from your dev tools into the jsonlint validator box provided
- Click 'Validate' to see where in the data the error is coming from and copy the text, or note down the line number provided:
Using the validator tool, we can see what line the error occurred on, as well as some text to make searching for this invalid character much easier.
- In a notepad editor, preferably Notepad++, paste the same code into a new notepad and search for the part of the text shown previously in the validation results:
In Notepad++, you can see the line numbers which can help you quickly locate the area where the line is failing by using keys CTRL + G on your keyboard to pull up the search and type in the line number (14337 in the example above) or by doing a normal search (CTRL + F) to search for the text we found in Step 7.
- Look above the error text for "AssetID": xxxx. In the above example, it is "AssetID":6000
Now that we have the invalid character and location, find it in the database and make the correction:
- Using SQL Server Management Studio, expand the IntranetConnections database > Tables > look for the 'Asset' table
- Right-click on the Asset table > click 'select top 1000 rows' > a new query window will open with each column presented in this table.
As shown in the following example, you can narrow down the results to the item we know is causing the error:
Similar to the previous example, we used AssetID=6000 to demonstrate.
- Modifying the query, you can add a where statement to target the specific area (eg. where assetid=6000)
- Click 'execute' or tap the F5 key on your keyboard
- Locate the invalid character to confirm the problem > click into this field and copy all text into a blank notepad or text editor
- Remove or replace the invalid character with the correct text
- Write an update script to correct this issue, for example:
update asset set title = 'Insert text from your notepad/text editor' where assetid=xxxx
- Navigate back to the intranet admin > setup screen > click 'restart' under Intranet Application
- Browse back to the area of the site where you were seeing this error and check to see if the error has been resolved.