I want to upgrade our Confluence to 4.0. We are using 3.1 currently and have several plugins that are deprecated in 4.0. I've cloned our Confluence instance to a test server and disabled said plugins. Is there a way I can quickly find any page containing "Unknown macro: {whatever}"?
I'm looking for any answer other than "look through every page on the search results for every macro keyword".
Using the script provided as an answer to https://answers.atlassian.com/questions/15230/confluence-4-0-finding-pages-that-have-content-with-incompatible-upgraded-macros , I was able to identify all pages (hopefully) within all spaces that contained errors.
Hi there Justin, I've recently written this Python script that will connect to a Confluence sever and scan for the kinds of broken content you're describing (including links, images, includes, macros).
If you're comfortable running Python scripts, the script is available on Bitbucket: https://bitbucket.org/edawson/busted-stuff-report/changeset/039bd9034311
Simply run that, and it will generate a HTML report listing all the pages with broken content.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Not sure the macro regex is identifying broken pages appropriately. I get errors, but only on the first "<title>Log In" test. I specifically tested the script on a space that I know has broken macros and it does not identify this in the report.
Does this examine the source HTML for all pages within a space? If so, "Unknown macro" isn't present in page source, but rather it's a wysiwyg-unknown-macro img class. However, replacing this html source into your script still does not return any hits.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Not sure where the wysiwyg class came from or went, but I just reloaded the page and the div class="error" is now present as well as "Unknown macro". I still did not get anything in the report about these pages though using the version on bitbucket.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi there Justin,
This script is written for Confluence 4.0, if you are seeing "login errors", then either the password for the username is not correct or perhaps the username does not have permissions to view the page where the error occurs.
We are testing the script against Confluence 4.0, the errors you are seeing might be specific migration artifacts. There may be more cases of macro errors that we could add to the script.
Can you give me an example of the error text you are seeing in the page, that should be detected?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Edwin,
I figured out what the issue was. First, i'm running HTTPS, so that may be the root of why the script wasn't working from the get-go. In order to bypass that issue, I used Gavin Fowler's code from the Question above as a starting point.
My call on line 192 now looks like:
pageId= page_summary['id'] html = downloadpage(site_address,s,token,conf_space,pageId)
Obviously this warrants a change to the downloadpage definition to accept these inputs. Within that function, line 133 becomes:
html = s.renderContent(token,conf_space,pageId,'',{'style':'clean'})
which was taken directly from Gavin's solution linked above in my "Accepted Answer". Running with these changes now produces the correct behavior: Log In error is gone, Macro Error is found.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi again Justin, thanks for providing some troubleshooting on this script!
Please let me know if there's anything else I can help you with.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Sirs,
I know it's kind of late but is there any plan on compatibility with Confluence 5.x ?
Thanks
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
That's gone now. Atlassian has helpfully trashed it.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
This is actually a question. Does the python script from Bitbucket still work? When I try to run it, I get an error on line 125 where it tries to use XML-RPC to retrieve a list of all pages in the space. The error says, "unsupported XML-RPC protocol" I checked around and discovered that XML-RPC has be deprecated since 5.5, and I'm using 5.9.3. Does this part of the script need to be rewritten to use REST API? Any suggestions on how to do that?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
I think we've found someone with a solution for you - I've asked them to give you an answer here.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.