WikiPost

WikiPost [Paid] 1.0.6

No permission to buy ($40.00)
@JulianD Unfortunately I've run across some errors after installing this addon:

Code:
    ErrorException: Fatal Error: Access level to SV\UserEssentials\XF\Pub\Controller\Thread::finalizeThreadReply() must be public (as in class Laneros\WikiPost\XF\Pub\Controller\Thread) src/addons/SV/UserEssentials/XF/Pub/Controller/Thread.php:0

    Generated by: Unknown account Aug 19, 2020 at 4:43 PM

Stack trace

#0 [internal function]: XF::handleFatalError()
#1 {main}

Request state

array(4) {
  ["url"] => string(35) "/threads/seattle-wa.1095/post-41758"
  ["referrer"] => bool(false)
  ["_GET"] => array(1) {
    ["/threads/seattle-wa_1095/post-41758"] => string(0) ""
  }
  ["_POST"] => array(0) {
  }
}

and

Code:
    ErrorException: Template error: Method canWatchWikiPost is not callable on the given object (SV\ModeratorEssentials\XF\Entity\Thread) src/XF/Template/Templater.php:994

    Generated by: Unknown account Aug 20, 2020 at 7:10 AM

Stack trace

#0 [internal function]: XF\Template\Templater->handleTemplateError(512, 'Method canWatch...', '/home/nginx/dom...', 994, Array)
#1 src/XF/Template/Templater.php(994): trigger_error('Method canWatch...', 512)
#2 internal_data/code_cache/templates/l3/s117/public/wikipost_wikitools_menu.php(53): XF\Template\Templater->method(Object(SV\ModeratorEssentials\XF\Entity\Thread), 'canWatchWikiPos...', Array)
#3 src/XF/Template/Templater.php(1315): XF\Template\Templater->{closure}(Object(SV\StandardLib\XF\Template\Templater), Array)
# 4 src / XF / Template / Templater.php (1388): XF \ Template \ Templater-> renderTemplate ('wikipost_wikito ...', Array)
#5 internal_data/code_cache/templates/l3/s117/public/thread_view.php(506): XF\Template\Templater->includeTemplate('public:wikipost...', Array)
#6 src/XF/Template/Templater.php(1315): XF\Template\Templater->{closure}(Object(SV\StandardLib\XF\Template\Templater), Array)
#7 src/XF/Template/Template.php(24): XF\Template\Templater->renderTemplate('thread_view', Array)
#8 src/XF/Mvc/Renderer/Html.php(48): XF\Template\Template->render()
#9 src/XF/Mvc/Dispatcher.php(458): XF\Mvc\Renderer\Html->renderView('XF:Thread\\View', 'public:thread_v...', Array)
#10 src/XF/Mvc/Dispatcher.php(440): XF\Mvc\Dispatcher->renderView(Object(XF\Mvc\Renderer\Html), Object(XF\Mvc\Reply\View))
#11 src/XF/Mvc/Dispatcher.php(400): XF\Mvc\Dispatcher->renderReply(Object(XF\Mvc\Renderer\Html), Object(XF\Mvc\Reply\View))
#12 src/XF/Mvc/Dispatcher.php(58): XF\Mvc\Dispatcher->render(Object(XF\Mvc\Reply\View), 'html')
#13 src/XF/App.php(2190): XF\Mvc\Dispatcher->run()
#14 src/XF.php(391): XF\App->run()
#15 index.php(20): XF::runApp('XF\\Pub\\App')
#16 {main}

Request state

array(4) {
  ["url"] => string(35) "/threads/throw-tent-and-tarp.28955/"
  ["referrer"] => bool(false)
  ["_GET"] => array(1) {
    ["/threads/throw-tent-and-tarp_28955/"] => string(0) ""
  }
  ["_POST"] => array(0) {
  }
}

Code:
    InvalidArgumentException: Accessed unknown getter 'WikiPostApprovalQueue' on XF:Post[210522] src/XF/Mvc/Entity/Entity.php:194

    Generated by: Unknown account Aug 20, 2020 at 7:10 AM

Stack trace

#0 src/XF/Mvc/Entity/Entity.php(106): XF\Mvc\Entity\Entity->get('WikiPostApprova...')
#1 internal_data/code_cache/templates/l3/s117/public/thread_view.php(323): XF\Mvc\Entity\Entity->offsetGet('WikiPostApprova...')
#2 src/XF/Template/Templater.php(1315): XF\Template\Templater->{closure}(Object(SV\StandardLib\XF\Template\Templater), Array)
#3 src/XF/Template/Template.php(24): XF\Template\Templater->renderTemplate('thread_view', Array)
#4 src/XF/Mvc/Renderer/Html.php(48): XF\Template\Template->render()
#5 src/XF/Mvc/Dispatcher.php(458): XF\Mvc\Renderer\Html->renderView('XF:Thread\\View', 'public:thread_v...', Array)
#6 src/XF/Mvc/Dispatcher.php(440): XF\Mvc\Dispatcher->renderView(Object(XF\Mvc\Renderer\Html), Object(XF\Mvc\Reply\View))
#7 src/XF/Mvc/Dispatcher.php(400): XF\Mvc\Dispatcher->renderReply(Object(XF\Mvc\Renderer\Html), Object(XF\Mvc\Reply\View))
#8 src/XF/Mvc/Dispatcher.php(58): XF\Mvc\Dispatcher->render(Object(XF\Mvc\Reply\View), 'html')
#9 src/XF/App.php(2190): XF\Mvc\Dispatcher->run()
#10 src/XF.php(391): XF\App->run()
#11 index.php(20): XF::runApp('XF\\Pub\\App')
#12 {main}

Request state

array(4) {
  ["url"] => string(35) "/threads/throw-tent-and-tarp.28955/"
  ["referrer"] => bool(false)
  ["_GET"] => array(1) {
    ["/threads/throw-tent-and-tarp_28955/"] => string(0) ""
  }
  ["_POST"] => array(0) {
  }
}

Code:
    InvalidArgumentException: Accessed unknown getter 'wikipost' on XF:Thread[28955] src/XF/Mvc/Entity/Entity.php:194 

    Generated by: Unknown account Aug 20, 2020 at 7:10 AM 

Stack trace 

#0 src/XF/Mvc/Entity/Entity.php(106): XF\Mvc\Entity\Entity->get('wikipost') 
#1 internal_data/code_cache/templates/l3/s117/public/thread_view.php(323): XF\Mvc\Entity\Entity->offsetGet('wikipost') 
#2 src/XF/Template/Templater.php(1315): XF\Template\Templater->{closure}(Object(SV\StandardLib\XF\Template\Templater), Array) 
#3 src/XF/Template/Template.php(24): XF\Template\Templater->renderTemplate('thread_view', Array) 
#4 src/XF/Mvc/Renderer/Html.php(48): XF\Template\Template->render() 
#5 src/XF/Mvc/Dispatcher.php(458): XF\Mvc\Renderer\Html->renderView('XF:Thread\\View', 'public:thread_v...', Array) 
#6 src/XF/Mvc/Dispatcher.php(440): XF\Mvc\Dispatcher->renderView(Object(XF\Mvc\Renderer\Html), Object(XF\Mvc\Reply\View)) 
#7 src/XF/Mvc/Dispatcher.php(400): XF\Mvc\Dispatcher->renderReply(Object(XF\Mvc\Renderer\Html), Object(XF\Mvc\Reply\View)) 
#8 src/XF/Mvc/Dispatcher.php(58): XF\Mvc\Dispatcher->render(Object(XF\Mvc\Reply\View), 'html') 
#9 src/XF/App.php(2190): XF\Mvc\Dispatcher->run() 
#10 src/XF.php(391): XF\App->run() 
#11 index.php(20): XF::runApp('XF\\Pub\\App') 
#12 {main} 

Request state 

array(4) { 
  ["url"] => string(35) "/threads/throw-tent-and-tarp.28955/" 
  ["referrer"] => bool(false) 
  ["_GET"] => array(1) { 
    ["/threads/throw-tent-and-tarp_28955/"] => string(0) "" 
  } 
  ["_POST"] => array(0) { 
  } 
}

those are the main errors, about 20,000 in the past 24 hours. seems to be a conflict between your addon and @Xon's Moderator Essentials and User Essentials addons. I've had to disable the wiki addon for now but let me know if you need an admin login to test with.
 
@JulianD Unfortunately I've run across some errors after installing this addon:

Code:
    ErrorException: Fatal Error: Access level to SV\UserEssentials\XF\Pub\Controller\Thread::finalizeThreadReply() must be public (as in class Laneros\WikiPost\XF\Pub\Controller\Thread) src/addons/SV/UserEssentials/XF/Pub/Controller/Thread.php:0

    Generated by: Unknown account Aug 19, 2020 at 4:43 PM

Stack trace

#0 [internal function]: XF::handleFatalError()
#1 {main}

Request state

array(4) {
  ["url"] => string(35) "/threads/seattle-wa.1095/post-41758"
  ["referrer"] => bool(false)
  ["_GET"] => array(1) {
    ["/threads/seattle-wa_1095/post-41758"] => string(0) ""
  }
  ["_POST"] => array(0) {
  }
}

and

Code:
    ErrorException: Template error: Method canWatchWikiPost is not callable on the given object (SV\ModeratorEssentials\XF\Entity\Thread) src/XF/Template/Templater.php:994

    Generated by: Unknown account Aug 20, 2020 at 7:10 AM

Stack trace

#0 [internal function]: XF\Template\Templater->handleTemplateError(512, 'Method canWatch...', '/home/nginx/dom...', 994, Array)
#1 src/XF/Template/Templater.php(994): trigger_error('Method canWatch...', 512)
#2 internal_data/code_cache/templates/l3/s117/public/wikipost_wikitools_menu.php(53): XF\Template\Templater->method(Object(SV\ModeratorEssentials\XF\Entity\Thread), 'canWatchWikiPos...', Array)
#3 src/XF/Template/Templater.php(1315): XF\Template\Templater->{closure}(Object(SV\StandardLib\XF\Template\Templater), Array)
# 4 src / XF / Template / Templater.php (1388): XF \ Template \ Templater-> renderTemplate ('wikipost_wikito ...', Array)
#5 internal_data/code_cache/templates/l3/s117/public/thread_view.php(506): XF\Template\Templater->includeTemplate('public:wikipost...', Array)
#6 src/XF/Template/Templater.php(1315): XF\Template\Templater->{closure}(Object(SV\StandardLib\XF\Template\Templater), Array)
#7 src/XF/Template/Template.php(24): XF\Template\Templater->renderTemplate('thread_view', Array)
#8 src/XF/Mvc/Renderer/Html.php(48): XF\Template\Template->render()
#9 src/XF/Mvc/Dispatcher.php(458): XF\Mvc\Renderer\Html->renderView('XF:Thread\\View', 'public:thread_v...', Array)
#10 src/XF/Mvc/Dispatcher.php(440): XF\Mvc\Dispatcher->renderView(Object(XF\Mvc\Renderer\Html), Object(XF\Mvc\Reply\View))
#11 src/XF/Mvc/Dispatcher.php(400): XF\Mvc\Dispatcher->renderReply(Object(XF\Mvc\Renderer\Html), Object(XF\Mvc\Reply\View))
#12 src/XF/Mvc/Dispatcher.php(58): XF\Mvc\Dispatcher->render(Object(XF\Mvc\Reply\View), 'html')
#13 src/XF/App.php(2190): XF\Mvc\Dispatcher->run()
#14 src/XF.php(391): XF\App->run()
#15 index.php(20): XF::runApp('XF\\Pub\\App')
#16 {main}

Request state

array(4) {
  ["url"] => string(35) "/threads/throw-tent-and-tarp.28955/"
  ["referrer"] => bool(false)
  ["_GET"] => array(1) {
    ["/threads/throw-tent-and-tarp_28955/"] => string(0) ""
  }
  ["_POST"] => array(0) {
  }
}

Code:
    InvalidArgumentException: Accessed unknown getter 'WikiPostApprovalQueue' on XF:Post[210522] src/XF/Mvc/Entity/Entity.php:194

    Generated by: Unknown account Aug 20, 2020 at 7:10 AM

Stack trace

#0 src/XF/Mvc/Entity/Entity.php(106): XF\Mvc\Entity\Entity->get('WikiPostApprova...')
#1 internal_data/code_cache/templates/l3/s117/public/thread_view.php(323): XF\Mvc\Entity\Entity->offsetGet('WikiPostApprova...')
#2 src/XF/Template/Templater.php(1315): XF\Template\Templater->{closure}(Object(SV\StandardLib\XF\Template\Templater), Array)
#3 src/XF/Template/Template.php(24): XF\Template\Templater->renderTemplate('thread_view', Array)
#4 src/XF/Mvc/Renderer/Html.php(48): XF\Template\Template->render()
#5 src/XF/Mvc/Dispatcher.php(458): XF\Mvc\Renderer\Html->renderView('XF:Thread\\View', 'public:thread_v...', Array)
#6 src/XF/Mvc/Dispatcher.php(440): XF\Mvc\Dispatcher->renderView(Object(XF\Mvc\Renderer\Html), Object(XF\Mvc\Reply\View))
#7 src/XF/Mvc/Dispatcher.php(400): XF\Mvc\Dispatcher->renderReply(Object(XF\Mvc\Renderer\Html), Object(XF\Mvc\Reply\View))
#8 src/XF/Mvc/Dispatcher.php(58): XF\Mvc\Dispatcher->render(Object(XF\Mvc\Reply\View), 'html')
#9 src/XF/App.php(2190): XF\Mvc\Dispatcher->run()
#10 src/XF.php(391): XF\App->run()
#11 index.php(20): XF::runApp('XF\\Pub\\App')
#12 {main}

Request state

array(4) {
  ["url"] => string(35) "/threads/throw-tent-and-tarp.28955/"
  ["referrer"] => bool(false)
  ["_GET"] => array(1) {
    ["/threads/throw-tent-and-tarp_28955/"] => string(0) ""
  }
  ["_POST"] => array(0) {
  }
}

Code:
    InvalidArgumentException: Accessed unknown getter 'wikipost' on XF:Thread[28955] src/XF/Mvc/Entity/Entity.php:194

    Generated by: Unknown account Aug 20, 2020 at 7:10 AM

Stack trace

#0 src/XF/Mvc/Entity/Entity.php(106): XF\Mvc\Entity\Entity->get('wikipost')
#1 internal_data/code_cache/templates/l3/s117/public/thread_view.php(323): XF\Mvc\Entity\Entity->offsetGet('wikipost')
#2 src/XF/Template/Templater.php(1315): XF\Template\Templater->{closure}(Object(SV\StandardLib\XF\Template\Templater), Array)
#3 src/XF/Template/Template.php(24): XF\Template\Templater->renderTemplate('thread_view', Array)
#4 src/XF/Mvc/Renderer/Html.php(48): XF\Template\Template->render()
#5 src/XF/Mvc/Dispatcher.php(458): XF\Mvc\Renderer\Html->renderView('XF:Thread\\View', 'public:thread_v...', Array)
#6 src/XF/Mvc/Dispatcher.php(440): XF\Mvc\Dispatcher->renderView(Object(XF\Mvc\Renderer\Html), Object(XF\Mvc\Reply\View))
#7 src/XF/Mvc/Dispatcher.php(400): XF\Mvc\Dispatcher->renderReply(Object(XF\Mvc\Renderer\Html), Object(XF\Mvc\Reply\View))
#8 src/XF/Mvc/Dispatcher.php(58): XF\Mvc\Dispatcher->render(Object(XF\Mvc\Reply\View), 'html')
#9 src/XF/App.php(2190): XF\Mvc\Dispatcher->run()
#10 src/XF.php(391): XF\App->run()
#11 index.php(20): XF::runApp('XF\\Pub\\App')
#12 {main}

Request state

array(4) {
  ["url"] => string(35) "/threads/throw-tent-and-tarp.28955/"
  ["referrer"] => bool(false)
  ["_GET"] => array(1) {
    ["/threads/throw-tent-and-tarp_28955/"] => string(0) ""
  }
  ["_POST"] => array(0) {
  }
}

those are the main errors, about 20,000 in the past 24 hours. seems to be a conflict between your addon and @Xon's Moderator Essentials and User Essentials addons. I've had to disable the wiki addon for now but let me know if you need an admin login to test with.
Thank you very much for reporting it to me. I have fixed the problem and the bugfix will be included in the next release.
 
  • Like
Reactions: arn
Suggestion: Override default wiki post history date to retain all edits (or for a longer duration) than set in the ACP.

:)
There is an option to disable the history pruning although it applies site wide:

options-png.231064
 
If I am to understand this correctly, it's just for the posts that are wikis, right?
No, it applies to the entire edit history regardless if it's a WikiPost or not. I decided to do it this way because it is better to protect WikiPosts that are disabled temporarily.
 
No, it applies to the entire edit history regardless if it's a WikiPost or not. I decided to do it this way because it is better to protect WikiPosts that are disabled temporarily.
I would suggest making it do it to wikis and disabled wikis at this point then. The pruning could take up a lot of room...
 
Am I missing a setting?

As admin, I can't Protect WikiPost on another user's thread. Is that expected behavior?

Screen Shot 2020-10-29 at 2.45.55 PM.webp
 
JulianD updated WikiPost with a new update entry:

Minor change and bug fixes to the Protect WikiPost feature

The protect WikiPost feature was not implemented very clear. I have created a new permission Protect Own WikiPosts which allows you to specify which usergroups will have the ability to protect their WikiPosts.

Administrators and moderators also need to specify themselves the Protect any WikiPost permission in case they want to use the protect feature in any WikiPost they do not own.

Read the rest of this update entry...
 
Am I missing a setting?

As admin, I can't Protect WikiPost on another user's thread. Is that expected behavior?

View attachment 238645
Hopefully the latest release makes it more clear who can use the Protect WikiPost feature. There's a new permission to control who can protect their own WikiPost and a bug fix to the Protoect any WikiPost permission that should resolve the problem you were having. Thanks for reporting it!.
 
Thanks! I’ll give it a go. I ran into something else. I hadn’t tested the suggest wiki functionality but here’s how it ended up looking.

someone asked to suggest and then there was a “wikipost” menu option that if I choose it does this. Similarly I’m not the thread owner.
 

Attachments

  • 9FCC57E2-A5B4-4E59-941F-0C6F43777709.webp
    9FCC57E2-A5B4-4E59-941F-0C6F43777709.webp
    40.9 KB · Views: 14
Thanks! I’ll give it a go. I ran into something else. I hadn’t tested the suggest wiki functionality but here’s how it ended up looking.

someone asked to suggest and then there was a “wikipost” menu option that if I choose it does this. Similarly I’m not the thread owner.
Functionality wise, it looks like it's working as intended. I tried it myself in my local copy and the steps are:

1. You suggest a wikipost to be enabled in a thread that is not a Wikipost
2. A notice appears at the top of the thread indicating that there's a pending suggestion
3. The WikiPost dropdown menu changes to let the visitor know that there's a pending suggestion.
4. If he clicks the button, an error appears because there's a pending suggestion.

1604083275435.webp

I think the process can be improved if we don't let the visitor click on the Suggest button in case there's a pending suggestion, so they don't get confused with the error message. Or if you have a better solution, I'm always open to suggestions!

Now, design wise, I'm not sure if there's something wrong in the way the error modal or the suggestion notice appear in your site.

Let me know if you have any comments about this.
 
Functionality wise, it looks like it's working as intended. I tried it myself in my local copy and the steps are:

1. You suggest a wikipost to be enabled in a thread that is not a Wikipost
2. A notice appears at the top of the thread indicating that there's a pending suggestion
3. The WikiPost dropdown menu changes to let the visitor know that there's a pending suggestion.
4. If he clicks the button, an error appears because there's a pending suggestion.

View attachment 238701

I think the process can be improved if we don't let the visitor click on the Suggest button in case there's a pending suggestion, so they don't get confused with the error message. Or if you have a better solution, I'm always open to suggestions!

Now, design wise, I'm not sure if there's something wrong in the way the error modal or the suggestion notice appear in your site.

Let me know if you have any comments about this.

Ok that makes sense. I guess I got confused how the Suggest function works.

Here's where I am.

I created two non-admin users. Both have wiki creation and suggestion permissions.

User 1 posts a thread
User 2 suggests it be a wiki

What's supposed to happen? From my testing

User 1 gets no notification
User 1 sees the notice "This thread has been suggested as a wiki" when viewing that thread, but there is no way to act on that. If User 1 enables Wiki from the drop down menu, the notice remains.

As admin, I don't see it in the Approval queue. Though that has happened sometimes.

arn
 
Last edited:
Back
Top Bottom