MODs Reappearing

Want to share what MODs you've gotten to work with EM? Happy about all the time your're saving? Want to say "thanks"? Here's the place.
Forum rules
DO NOT give out any FTP passwords to anyone! There is no reason to do so! If you need help badly enough, create a temporary FTP account that is restricted to only the files that you need help with and give the information for that. Giving out FTP information can be very dangerous!
Locked
User avatar
markus_petrux
Registered User
Posts: 376
Joined: Fri Jun 18, 2004 10:58 pm
Location: Girona, Catalunya (Spain)
Contact:

Re: MODs Reappearing

Post by markus_petrux » Sun Jul 10, 2005 5:14 pm

Maybe people using EM probably tends to use AcydBurn's upgrade MODs, instead of uploading fresh phpBB files and installing all MODs again. It would make more sense to bypass the phpBB version is such situations, I believe.

Otherwise, which are the alternatives?

a) Update the phpBB version for all installed MODs in the EM table?
Nah..

b) Remove mods/*.* folders of ALL previously installed MODs?
Nuttzy99 wrote: Bottom line: if you don't want the file to appear on the list, then go to your admin/mods directory and delete or move the directories in there. Then the MODs will no longer show up on the list.
I believe this doesn't make sense, thinking someday an uninstall MOD feature is added to EM, so this action would remove all backed up files.

Sophist
Registered User
Posts: 2
Joined: Sat Jul 16, 2005 7:09 pm

Re: MODs Reappearing

Post by Sophist » Sat Jul 16, 2005 7:20 pm

The previous discussion in this topic describes the issue:

When you use AcydBurn's upgrade mods, you then run a php file which upgrades the phpbb version number. EasyMod then thinks that you have reinstalled phpBB from scratch and you need to reinstall all the previous mods so it lists them again. Of course having used the MOD based upgrade, this is not actually the case.

I have PM'd AcydBurn a couple of time suggesting that he adds an SQL to the end of his MODs to update the version number of all previous installed mods - and I tied it myself with the 2.0.16 upgrade by adding the following lines at the end of the upgrade mod:

Code: Select all

# 
#-----[ SQL ]--------------------------------------------- 
# 
# PLEASE NOTE&#58 Do not manually execute these SQL statements because they have been written 
# in such a way so as to be in accord with EasyMod's SQL-syntax; if you do not have 
# EasyMod v0.1.13 then you do not need to worry about these statements.
# 
UPDATE `phpbb_easymod` Set `mod_phpBB_version` = '2.0.16'; 
It almost worked - the only mod left in the install list was the upgrade MOD itself - presumably because it was not in the table at the time the SQL statement was executed.

Upon reflection it might be better for the "update_to_latest.php" script to run this SQL statement if the easymod table exists. Does someone want to code that?

Sophist

imrich
Registered User
Posts: 38
Joined: Tue Aug 02, 2005 1:42 pm

Re: MODs Reappearing

Post by imrich » Tue Aug 09, 2005 8:32 pm

Hmmm... I'd like to really understand this.

I am in the same boat I believe.

I have a phpbb which has been kept up to date with the various mods to update to the latest changes. This way I don't have to try to install all my mods again as everything is working great.

However EZ-Mod seems to always want to list a lot of my mods as 'unprocessed mods'. I'm using beta 0.2.1a of EasyMod. The confusing thing is that they are also shown in the 'easymod history' screen of 'installed mods'. How can a mod be both 'unprocessed' and on the 'installed mods' list? ;)

These mods HAVE been successfully installed. So I don't want to install them again (as they have already been installed :roll: ), and I'd prefer not to remove them from my admin/mods folder as they serve as documentation as to what mods I've installed.

So is there an easy fix for this?

I wouldn't mind manually updating the easymod mysql table to show that the version of phpbb during the mod install is the same as the current version, but this is something that should be handled better, shouldn't it?

Perhaps a 'installed_succesfully' flag in the easymod mysql table instead of relying on checking the version number comparisons?

Anyone have a good idea on the best way to handle this now?

How can easymod handle this in the future in a better way?

User avatar
markus_petrux
Registered User
Posts: 376
Joined: Fri Jun 18, 2004 10:58 pm
Location: Girona, Catalunya (Spain)
Contact:

Re: MODs Reappearing

Post by markus_petrux » Wed Aug 10, 2005 8:08 am

imrich wrote: So is there an easy fix for this?
Yep!
viewtopic.php?p=121786#121786

This is how current version of EasyMOD (0.2.1a at the time of writing) build the lisy of unprocessed MODs:
  1. EasyMOD scans the first level of subdirectories inside admin/mods to find MOD scripts (files with .txt or .mod extensions written with the MOD Template syntax).
  2. EasyMOD extracts the MOD name and version of all MOD scripts found to perform a DB query against the phpbb_easymod table. If row exists, that particular MOD script was successfully installed.

    IMHO, this should be enough and this is what my patch above does. However...
  3. ...current EM implementation also checks if the phpBB version at the time a MOD was installed matches the current phpBB version. If not, that MOD is selected to appear in the unprocessed MODs list.
IMHO, ignoring phpBB version changes is the best approach for both scenarios:
  1. phpBB upgrades are installed with Acyd's code changes MODs.

    This doesn't necessarily mean all currently installed MODs need to be upgraded, in which case their author will probably release an upgrade MOD which needs to be uploaded to its own subdirectory (inside the admin/mods folder) to be properly installed. ie. as if it was a new/different MOD.
  2. phpBB upgrades are installed by copying original phpBB files again.

    In this case, all the rows in the EasyMOD table should be removed. And all MODs have to be installed again.

    In this scenario, it is not clear what to do with changes in the DB. So that makes me think the best practice is a.
Is this reasonable?

User avatar
Nux
Registered User
Posts: 943
Joined: Tue Jun 14, 2005 5:09 pm
Location: 3cities, Poland
Contact:

Re: MODs Reappearing

Post by Nux » Wed Aug 10, 2005 6:12 pm

I belive that the best thing would be an option to reinstall MOD (for whatever reason). And to skip the version check.

Maybe just some notfication would be nice (that some MODs may need reprocessing)?

Or there could be a drop down box in the unprocessed MODs, that would give an ability to choose to show all MODs or just never processed MODs. In fact this would probably be the easiest thing to do (just one form and one variable to check :)).

User avatar
-=ET=-
Registered User
Posts: 211
Joined: Mon May 26, 2003 1:35 pm
Location: France

Re: MODs Reappearing

Post by -=ET=- » Thu Aug 11, 2005 11:58 pm

I fully agree with markus_petrux. This check is useless, and more, can be dangerous :roll:

Indeed, it exists 4 main phpBB upgrade methods, and this check is dangerous in any case!!!

You can upgrade phpBB by:
- an upgrade MOD (generally AcydBurn's one)
- replacing all the files by the new ones
- replacing only the changed files
- an upgrade patch
http://www.phpbb.com/phpBB/catdb.php?cat=48" target="_blank
http://www.phpbb.com/downloads.php" target="_blank

- if you upgrade phpBB by an upgrade MOD:
There is 2 possibilities: or there is no pb, no conflict, you can apply the upgrade MOD and of course all your MODs stay as is, fully installed; or trying to install the upgrade MOD you immediately detect some issues, you'll have to solve them, and once done, here again your MODs will stay fully installed (because in fact, solving the issues you'll have adapted the MODs to stay installed and become compliant).
=> So in this case the check is useless, and it's dangerous to suggest re-installing anything!

- if you upgrade by replacing all the phpBB files by the new ones:
Then this case is the best one for the interest of this check. But even here, EM suggests you to re-install in 3 clicks the whole MODs, including the DB modifications! 8O
=> So, even in this case there is a big issue as processing again SQL queries on an already upgraded DB can be dangerous!

- now if you replace only the changed files:
Here again this check is dangerous as EM will suggest you to fully re-install the MOD on some new files (OK), but also on some already MODed files (unchanged between the 2 phpBB version), and a DB already modified!

- and at last, if you want to use an upgrade patch:
This time, same as for an upgrade MOD, this check is useless (as all the MODs will stay fully installed) and dangerous because on the other hand you must NOT re-install anything!

So IMO, in any case this check is dangerous, as in any case it gives the possibility to re-install very easily the whole MODs in few clicks where in no case it's what must be done :(

And as EM doesn't have a clue of which upgrade method has been used, or we remove the check and say EM is not able to manage that, or we add a mandatory process:
- EM should be able to detect a new phpBB version
- them if the admin try to display an EM page, EM should ask which upgrade method has been used
- and if the answer is...
-> an upgrade MOD or an upgrade patch, EM should consider that the MODs are still fully installed
-> by replacing all the phpBB files by new ones, EM should suggests to re-install all the MODs except the SQL queries! (SQL queries should not be possible)
-> by replacing the changed files only by new ones, and EM... will be in the mess! lol :mrgreen: So it should IMO suggests to MOD again manually the new files (as EM doesn't know these files) and keep the MODs as is, so officially installed :roll:
Eternal newbie

imrich
Registered User
Posts: 38
Joined: Tue Aug 02, 2005 1:42 pm

Re: MODs Reappearing

Post by imrich » Fri Aug 12, 2005 2:08 pm

markus_petrux wrote: ...or you could apply this small hack to EasyMOD itself, so it ignores the phpBB version changes when checking if a MOD has been already processed.

OPEN: admin/admin_easymod.php

FIND:

Code: Select all

$row = $db->sql_fetchrow($result) ;
	if ( $row['mod_phpBB_version'] == $phpbb_version)
	{
		return false ;
	}
	else
	{
		return true ;
	}
REPLACE WITH:

Code: Select all

	if ( !$db->sql_fetchrow($result) )
	{
		return true;
	}
	return false;

This didn't quite fix it. I haven't finished understanding why, but I have a couple of mods which were installed in my current version of phpbb (2.0.17) and are still showing up as 'unprocessed'.

It may be caused by this particular mod having multiple .txt/.mod files in the same subdirectory. One is the main mod, and then there are some mod-to-the-mod files. All of them have been processed and have entries in the easymod mysql table, but for some reason they still show up in the 'unprocessed list' after I tried this 'mod to easymod'.

This is one of the 'offending' mods:

Code: Select all

## MOD Title&#58 Tabulated survey at topic head (upgrade from version 1.0.10 to 1.0.11)
## MOD Author&#58 asinshesq < asinsh@speakeasy.net > (Alan Sinsheimer) N/A
## MOD Description&#58	Allow users to design surveys that will appear at the top of a topic.  Users will be able to .
##			respond to the survey by clicking a button...each user response will appear at the topic head
##
## MOD Version&#58		1.0.11
The others are it's 'brothers' all within the same /admin/mods/thismod folder.

I still think a better option would be a 'successfully installed' flag which is set in the easymod table after processing is complete. Then easymod would know definately which mods were installed properly or not.

Do any of those in control of easymod have recommendations?

User avatar
markus_petrux
Registered User
Posts: 376
Joined: Fri Jun 18, 2004 10:58 pm
Location: Girona, Catalunya (Spain)
Contact:

Re: MODs Reappearing

Post by markus_petrux » Fri Aug 12, 2005 4:10 pm

Your problem is related to something else... the is_unprocessed() function compares the whole MOD title extracted from the MOD file against the mod_title field stored in the DB, which is, IIRC, 50 chars. Bang!

This limit does not only come from the table schema, but it's also hardcoded into EM. Not easy to fix, atm. The best approach would be to edit the MOD instructions to use a shorter MOD title, prior to installing the MOD.

User avatar
Nux
Registered User
Posts: 943
Joined: Tue Jun 14, 2005 5:09 pm
Location: 3cities, Poland
Contact:

Re: MODs Reappearing

Post by Nux » Sat Aug 13, 2005 7:54 pm

imrich wrote: This didn't quite fix it. I haven't finished understanding why, but I have a couple of mods which were installed in my current version of phpbb (2.0.17) and are still showing up as 'unprocessed'.

It may be caused by this particular mod having multiple .txt/.mod files in the same subdirectory. One is the main mod, and then there are some mod-to-the-mod files. All of them have been processed and have entries in the easymod mysql table, but for some reason they still show up in the 'unprocessed list' after I tried this 'mod to easymod'.
I belive that everything is OK. As you might notice the MOD you were talking about was an upgrade and you probably installed the MOD from scratch (didn't needed the upgrade). The upgrade MOD is a separate MOD, you don't whant to install it as you have the newest version, but someone els could whant it...

Anyway, I agree that there should be an abillity for a user (admin) to delete MOD form unprocessed list.

everah
Registered User
Posts: 2
Joined: Mon Aug 15, 2005 6:44 am
Location: In the dark
Contact:

Re: MODs Reappearing

Post by everah » Mon Aug 15, 2005 7:05 am

Would it be too hard to add a feature in the Mod CP that allows the admin to mark the mod as installed? Then, if the mod has been installed, after a phpBB upgrade the admin can just check a box that says "mark as installed". Next Mod CP load the list will be back to clear and everyone will be happy.

Locked