Fix bugs arising from joomla code #29922

issues arise from #959
Merge pull request #1099 from wilsonge/crios2

Fix bugs arising from joomla code #29922