Mod installer: Report failed reason

Started by Jeroi, September 30, 2015, 06:53:28 AM

Previous topic - Next topic

Jeroi

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.

Shambles

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

Jeroi

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.

Shambles

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

Kindred

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.
Слaва
Украинi

Please do not PM, IM or Email me with support questions.  You will get better and faster responses in the support boards.  Thank you.

"Loki is not evil, although he is certainly not a force for good. Loki is... complicated."

Jeroi

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'])

margarett

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
Se forem conduzir, não bebam. Se forem beber... CHAMEM-ME!!!! :D

QuoteOver 90% of all computer problems can be traced back to the interface between the keyboard and the chair

Avid Gamer

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.
Mess with the Best
Die like the Rest.

Advertisement: