Simple Machines Community Forum

SMF Development => Feature Requests => Applied or Declined Requests => Topic started by: Jeroi on September 30, 2015, 06:53:28 AM

Title: Mod installer: Report failed reason
Post by: Jeroi on September 30, 2015, 06:53:28 AM
Hello, I have programming experience and atm it is pretty pain to guess what is the mod installer error reason. Some errors are gone by allowing read write and execution right to groups but some errors I think need some file checking and debugging.

Please could you have infobox appear on red failed test for failed reason?

If the installer would report PHP error on a box or more how I should say human readable error message then you could take a look manually what is wrong and where.
Title: Re: Mod installer: Report failed reason
Post by: Shambles on September 30, 2015, 06:56:55 AM
"failed test" is already indicated by the pencil icon to the left of the test; you can click that icon to see why the package manager couldn't pass that particular test.
Title: Re: Mod installer: Report failed reason
Post by: Jeroi on September 30, 2015, 06:58:10 AM
Quote from: Shambles on September 30, 2015, 06:56:55 AM
"failed test" is already indicated by the pencil icon to the left of the test; you can click that icon to see why the package manager couldn't pass that particular test.

But for some reaso the box usually errors on it seams cannot find speasified text on a file errors where in the box everything seems al right.
Title: Re: Mod installer: Report failed reason
Post by: Shambles on September 30, 2015, 07:01:04 AM
The box should show you what the package manager was searching for; if the text can't be found, you get shown the text that was being searched for and what was being changed/added/removed
Title: Re: Mod installer: Report failed reason
Post by: Kindred on September 30, 2015, 07:03:59 AM
if everything "seems alright" -- then you are definitely reading the code incorrectly... because, if the code was found - it would not have generated an error.   As indicated -- the pencil icon and pop-up box displayed exactly what code was searched for (and not found) and what code needed to be inserted or replaced.

there really isn't any option for more information.
Title: Re: Mod installer: Report failed reason
Post by: Jeroi on September 30, 2015, 07:06:27 AM
So one plugin error I fixed now because now days the orginal code dont have //info line avaialble and the plugin searches rows that has the //infoline.

// If this is the first post, (#0) just say when it was posted - otherwise give the reply #.
if ($message['can_approve'] || $context['can_reply'] || $message['can_modify'] || $message['can_remove'] || $context['can_split'] || $context['can_restore_msg'])


Where my server there is only one line:

if ($message['can_approve'] || $context['can_reply'] || $message['can_modify'] || $message['can_remove'] || $context['can_split'] || $context['can_restore_msg'])
Title: Re: Mod installer: Report failed reason
Post by: margarett on September 30, 2015, 07:06:57 AM
That might happen especially in Themes' files. In Sources files you might have some conflicts but it's easier to fix. About Themes: the MODs are designed to work with default theme only and it should be more or less possible to find the required strings. In both cases, you can still find issues if:
a) you're trying to install a MOD not designed for the SMF version you're running (eg: try to install a MOD for 1.1.x in 2.0.x)
b) the "target" code was already modified by another MOD.

Regarding other themes: it is *impossible* for a MOD author to support every Theme out there and they can be *very* different.

So about your feature request: it exists already, it's the pencil that Shambles mentioned. But the solution for text which fails to be found is something which can only be found by a human...
http://wiki.simplemachines.org/smf/Error_in_mod_installation
Title: Re: Mod installer: Report failed reason
Post by: Avid Gamer on October 05, 2015, 07:36:23 AM
One of the reasons why this happens to me is that the tabs in the code startline are either reduced in number or increased and that also fails. This seems to happen quite frequently and wished that the search for code only included the code line not the tabbed spacing. Many times I had to add or remove a tab and then all goes well.

Hope this is of use.