If you are using php 7.3.x, my #165 solution still works for 2.1.0.3.I upgraded my XF2.0.10 to XF 2.1.3, and did upgrade xencarta v2.0.0.9 to 2.1.0.3., where it said Templates are outdated and proposed to merge, what I did. Now most of my Wiki pages are damaged.
Help aprecciated
Server error log
Stack trace
- ErrorException: Template error: preg_match(): Compilation failed: invalid range in character class at offset 4
- src/addons/EWR/Carta/Repository/Parser.php:95
- Generated by: xxx
- Aug 16, 2019 at 9:27 PM
#0 [internal function]: XF\Template\Templater->handleTemplateError(2, 'preg_match(): C...', '/www/htdocs/w00...', 95, Array)
#1 src/addons/EWR/Carta/Repository/Parser.php(95): preg_match('#([\\w-\\s]+)=(.+...', ' ', NULL)
#2 src/addons/EWR/Carta/Entity/Page.php(157): EWR\Carta\Repository\Parser->parseTemplatesFromHTML(Object(EWR\Carta\Entity\Page), '<div class="bbW...')
#3 src/XF/Mvc/Entity/Entity.php(148): EWR\Carta\Entity\Page->getParsed()
#4 src/XF/Mvc/Entity/Entity.php(106): XF\Mvc\Entity\Entity->get('parsed')
#5 internal_data/code_cache/templates/l2/s1/public/EWRcarta_page_macros.php(39): XF\Mvc\Entity\Entity->offsetGet('parsed')
#6 src/XF/Template/Templater.php(701): XF\Template\Templater->{closure}(Object(xenMade\ToDo\XF\Template\Templater), Array, Array)
#7 internal_data/code_cache/templates/l2/s1/public/EWRcarta_page_view.php(160): XF\Template\Templater->callMacro('EWRcarta_page_m...', 'page_tab', Array, Array)
#8 src/XF/Template/Templater.php(1315): XF\Template\Templater->{closure}(Object(xenMade\ToDo\XF\Template\Templater), Array)
#9 src/XF/Template/Template.php(24): XF\Template\Templater->renderTemplate('EWRcarta_page_v...', Array)
#10 src/XF/Mvc/Renderer/Html.php(48): XF\Template\Template->render()
#11 src/XF/Mvc/Dispatcher.php(418): XF\Mvc\Renderer\Html->renderView('EWR\\Cartaage\\...', 'public:EWRcarta...', Array)
#12 src/XF/Mvc/Dispatcher.php(400): XF\Mvc\Dispatcher->renderView(Object(XF\Mvc\Renderer\Html), Object(XF\Mvc\Reply\View))
#13 src/XF/Mvc/Dispatcher.php(360): XF\Mvc\Dispatcher->renderReply(Object(XF\Mvc\Renderer\Html), Object(XF\Mvc\Reply\View))
#14 src/XF/Mvc/Dispatcher.php(53): XF\Mvc\Dispatcher->render(Object(XF\Mvc\Reply\View), 'html')
#15 src/XF/App.php(2178): XF\Mvc\Dispatcher->run()
#16 src/XF.php(390): XF\App->run()
#17 index.php(20): XF::runApp('XF\\Pub\\App')
#18 {main}
Request state
array(4) {
["url"] => string(33) "/xenforo/ewr-carta/ac_289_sports/"
["referrer"] => string(49) "https://xxxxx.com/xenforo/ewr-carta/ac_289_sports/"
["_GET"] => array(0) {
}
["_POST"] => array(0) {
}
}
([\w-\s]+)=(.+)
\w
.([\-\w\s]+)=(.+)
- For some reason, in some versions of PCRE, you can't start a character class with
\w
. Seems like a bug with PHP, since you can start character classes with other shorthand classes such as\d
without issue. Either way, this update works around this issue which caused invalid character class range errors.- Fixed the uninstall script.
We do use the likes->reaction importer. For when upgrading from XF2.0.x to XF2.1.x. There is also an import script to upgrade the addon between XF1.5.x to XF2.0.x. There is no upgrade script from XF1.5.x to XF2.1.x. The upgrade process between XF2.0.x to XF2.1.x already takes care of any import requirements.@Jaxel I have upgraded XenCarta from XF1 to XF2.1, missing that you have the strange requirement of upgrading to XF2.0 version first. Question #1, why are you not using XenForo's likes -> reactions importer in your add-on? And question # 2, what can we do to resolve this issue now that the step has been skipped.
Tagging @Jake B. as well in case he is curious about the issue![]()
If you already uninstalled XenCarta for XF1... then your data is gone; as the uninstall script deletes all the data for the addon. You have to restore from backups. You shouldn't uninstall any XF1 addons until the XF2 versions are up and running.
If you still have XenCarta for XF1, then good.
- Uninstall XenCarta for XF2.1
- Install XenCarta for XF2.0
- run the import script
- Install XenCarta for XF2.1
{
"legacy_addon_id": "EWRcarta",
"title": "[8WR] XenCarta 2 (Wiki) PRO",
"description": "Light-weight, cache-able wiki. Add-on from 8WAYRUN.",
"version_id": 2104,
"version_string": "2.1.0.4",
"dev": "Jaxel",
"dev_url": "https://xenforo.com/community/resources/authors/1295/",
"faq_url": "https://xenforo.com/community/resources/6393/field?field=faq",
"support_url": "https://xenforo.com/community/resources/6393/",
"extra_urls": [],
"require": {
"XF": [
2010010,
"XenForo 2.1.0+"
]
},
"icon": "fa-book"
}
XF\Db\Exception: MySQL statement prepare error [1146]: Table 'xf_liked_content' doesn't exist in src/XF/Db/AbstractStatement.php at line 217
XF\Db\AbstractStatement->getException() in src/XF/Db/Mysqli/Statement.php at line 196
XF\Db\Mysqli\Statement->getException() in src/XF/Db/Mysqli/Statement.php at line 39
XF\Db\Mysqli\Statement->prepare() in src/XF/Db/Mysqli/Statement.php at line 54
XF\Db\Mysqli\Statement->execute() in src/XF/Db/AbstractAdapter.php at line 94
XF\Db\AbstractAdapter->query() in src/XF/Db/AbstractAdapter.php at line 326
XF\Db\AbstractAdapter->update() in src/addons/EWR/Carta/Import/Importer/Carta140.php at line 157
EWR\Carta\Import\Importer\Carta140->stepPages() in src/XF/Import/Runner.php at line 231
XF\Import\Runner->runStep() in src/XF/Import/Runner.php at line 59
XF\Import\Runner->run() in src/XF/Admin/Controller/Import.php at line 234
XF\Admin\Controller\Import->actionRun() in src/XF/Mvc/Dispatcher.php at line 321
XF\Mvc\Dispatcher->dispatchClass() in src/XF/Mvc/Dispatcher.php at line 248
XF\Mvc\Dispatcher->dispatchFromMatch() in src/XF/Mvc/Dispatcher.php at line 100
XF\Mvc\Dispatcher->dispatchLoop() in src/XF/Mvc/Dispatcher.php at line 50
XF\Mvc\Dispatcher->run() in src/XF/App.php at line 2178
XF\App->run() in src/XF.php at line 390
XF::runApp() in admin.php at line 13
$this->app->db->update('xf_liked_content', ['content_type' => 'ewr_carta_page'], 'content_type = ?', 'wiki');
xf_reaction_content
and will be continuing the import but is there any particular reason the importer was completely removed from the 2.1 version rather than adapted to work with it? It seems like that would be the path of least resistance for people looking to upgrade. As it stands without making manual changes to the code you would have to upgrade to XenForo 2.0, upgrade this add-on, then upgrade to 2.1 and upgrade the add-on again which seems a bit convoluted, or even just using the upgrade step process which was built for this purposeIt was not removed. It did not exist in the first place. An entirely new importer would have to be written for 2.1. Which is why I didn't.is there any particular reason the importer was completely removed from the 2.1 version
We use essential cookies to make this site work, and optional cookies to enhance your experience.