« Back Issue #248
  • 2014-11-11 16:17 Reported by epinapala
  • 2014-11-22 08:35 Marked fixed
Status: Marked fixed
Priority: Medium

[Wiki Help] : Fix issues with %20 to _ changes and cleanup wikiHelpBackLogic to not to be executed in all the controllers.

epinapala 2014-11-11 16:17

[Copying the messages from professor.]

Hey Eswara,

This still has the setupWikiHelpBackLogic in controller.php that I complained about. This is called on every page -- even backend pages connected to the crawler that couldn't have help. Push this code into a social component that is used by the admin and the group controllers. Also, $_REQUEST["back_params"] is still used in an unclean fashion. When I applied the patch, the help files still don't show because of the %20 to _ issue. You need to create a new upgrade function to handle this, you can't rely on existing ones that may have already been applied. I am going to push this patch because it addresses some of the issues I asked, but you need to make a new issue addressing the two things mentioned above.

Chris

Hi Professor,

  • Sorry for the misunderstanding, I thought it would be sufficient to check for the args/actions for executing the wikiHelpBackLogic . I understand now that you want it to be removed completely from the controller.php.Iw ill try to re-factor the wikiHelpBackLogic in such a way that its removed from controller.php and will be specified only in the controllers required. Is is ok, If the wikihelpBackLogic method is left in controller.php but only called from admin_controller and groups _controller?

please let me know.

  • For the %20 to _ issue, Should I create a new function for version 26? Currently the the installations on version 25 are the only ones affected. Should I write a script that re-imports the wiki articles instead? Please advise.

Eswara.

epinapala 2014-11-11 16:23

response from professor : http://www.seekquarry.com/mantis/view.php?id=154#c420

Please remove setupWikiHelpBackLogic from controller.php. You could put it in either in social_component or make a new help component for it (the latter might be more flexible). It could then be called using the call() method in controller.

For the %20 to _ issue, you can make a new version 26 of the db.

epinapala 2014-11-11 21:26

Hi Professor,

Please find the patch cs298_v16.patch

Below is a summary of all the changes:

> WikiHelpBackLogic cleanup

  • This fix Removes setupWikiHelpBackLogic method from controller.php preventing the method to be executed every time controller is loaded.
  • The first part of the contents of setupWikiHelpBackLogic are now moved to SocialComponent::wiki(). This ensures that the back-params/Back_url is set only when wiki action is executed, and in-turn only for read/edit args.
  • The second part of the contents of setupWikiHelpBackLogic, which are responsible for opening the help article automatically when 'open_help_page' Request param is set, is now moved to a setupParams method in help-button helper. This ensures that this logic is executed only when a help-button is loaded on the page, and that too only once.
  • Other $_REQUEST cleanup fixes.

> Database upgrade

  • Database upgrade to V26
  • Fixes Helppages in database to work with recent changes of using %20 <-> _ .
  • Also updated createdb.php & default.db with new articles.
  • Tested on versions <=24 & 25

Please let me know If you see any other problems, Again , thanks for your feedback.

Thanks Eswara

administrator 2014-11-11 23:06

Thanks for the patch. It seems to work. I have applied it locally but might take a day or to digest and push upstream.

epinapala 2014-11-11 23:08

Hi Professor,

Sure, thanks for the update. I will work on completing the phantomjs tests in the meanwhile.

Eswara

administrator 2014-11-22 08:35

Fixed by 3ae8b85

epinapala 2014-11-22 08:35

Attachments:

cs298_v16.patch

X