XF2 [8WR] XenCarta 2 (Wiki) PRO

XF2 [8WR] XenCarta 2 (Wiki) PRO [Paid] 2.2.0.2

No permission to buy ($30.00)
I figured out there are some pages still 100% displayed correctly, others have a couple of errors, others almost unusable. I could PM you the different pages (code and screenshot) if it is of help - or create an admin account for you to check in
 
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

  • 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
Stack trace

#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\\Carta:page\\...', '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) {
}
}
If you are using php 7.3.x, my #165 solution still works for 2.1.0.3.
 
Figured it out. Apparently, in the version of PCRE running on your server, the following is not a valid regular expression:
Code:
([\w-\s]+)=(.+)
Apparently, in some old versions of PCRE, you can not start a character range with \w.
I have changed the regular expression to the following for future versions:
Code:
([\-\w\s]+)=(.+)
 
Txs, where do I have to change it, Parser.php only ?
I did so, but no change :(
what I tried:
$codePattern = '#\[template=([\-\w]+)\](.*?)\[/template\]#si';
$dataPattern = '#([\-\w\s]+)=(.+)#si';

I changed the PHP Version from 7.3.6 to 7.2.19 - no difference here, so I switched back to 7.3.6
 
any way to get unfurled urls linked to a php wiki page to display the contents of the page (or even nothing) instead of the php file path?
 
@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 :)
 
@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 :)
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.

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
 
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

Unless I'm misunderstaing your recommendation, that is not possible as "EWRCarta" is defined as the legacy add-on ID in the 2.1 version of XenCarta:

Code:
{
    "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"
}

which treats it as an upgrade, so the 1.x version would have been upgraded to the 2.1 version, and the XF1 version is not listed as being installed. I assume you mean that we didn't uninstall it before doing the upgrade to XF2.1? If that's the case then no, we did not, but I do want to confirm that uninstalling the 2.1 version will not break any of the data for the 1.5 version as we'd really like to avoid restoring a backup of 1.5 and running the upgrade again.
 
That didn't work.

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

PHP:
$this->app->db->update('xf_liked_content', ['content_type' => 'ewr_carta_page'], 'content_type = ?', 'wiki');

It specifically references the xf_liked_content table. I've adjusted this to 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 purpose
 
is there any particular reason the importer was completely removed from the 2.1 version
It 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.
 
I bought the XenCarta add-on recently. Some QoL approvements I want to suggest:

Tags
Able to provide tags to an article. These tags will be used to generate the links. For example, I have an main article about a "car".

When I type in car in another article, it will link that word to the "car" article. However, when I type in Car or cars, it won't. What if you can add "cars" as a tag to that "car" article and use those tags to determine whether to link.

This new tag system will simplify things, because currently to achieve this I have to create all kinds of redirect pages. Also this clutters up my "Parent node" list with redirect-only articles.

Redirect to child nodes.
This request will be obsolete with the new tag system :) But it should be possible to redirect to child nodes.

[h2] and [h3], etc, able to add to the BB code button manager
Not sure why but I am unable to add the Wiki added BB codes to the button bar. I just want to select a piece of text and mark it with [H3], but instead I have to manually type it. I'm migrating a lot of articles to the new wiki, but this makes it less fun to do.

I do have found the custom BB codes under BB code -> Custom BB code, however, almost all options are greyed out and I suspect that I need to be able to mark "Editor icon", so that these new BB codes appear at the menu bar during thread creation.

Embedding
I want to be able to show only the article, with a specific GET parameter. Like /wiki/car?embed=true will only show me the bbWrapper class. This way I can embed a help system into my application.



Thanks for your time to read my suggestions. English is not my native language, I have the feeling I need a lot of words to explain myself. ;)
 
Top Bottom