Jump to content
TNG Community

Mod manager crashed whole TNG website


stuckagain

Recommended Posts

This morning I went into mod manager and updated some mods. Alas the whole of TNG is now unavailable, and I can't even see a way to switch off the problem mod so I can fix things. I think the culprit might be the Show Signature mod? The error message is "Fatal error: Cannot redeclare showSigPhoto() (previously declared in /home/mywebsite/public_html/sites/all/libraries/tng/extensions/signature.php:8) in /home/mywebsite/public_html/sites/all/libraries/tng/extensions/signature.php on line 8"

 

Any suggestions to help me get it running again? Thanks

Link to comment
Share on other sites

Hi, Your server normally does automatic backups of your site (daily or weekly). You could ask your service provider about these and if they can reset to your last backup before the site crashed.

 

Link to comment
Share on other sites

Not sure how you got a duplicate function.

The showSigPhoto  is only defined once in the tng/extensions/signature.php file.   You could rename the signature.php file in the tng/extensions folder.  The Mod Manager will show the mod as Partially Installed but you should be able to click the Clean Up button to uninstall the mod.

 

Link to comment
Share on other sites

The only way I can think of that you could get this duplicate function is if somehow you managed to have 2 instances of the mod code installed in genlib.php.

So the other option might be to replace the genlib.php module with the one from the TNG install or upgrade zip file.

Link to comment
Share on other sites

  • 1 month later...

I have downloaded a backup from 2 days before it crashed. Using these files I have separately tried all the following suggestions:

  • replaced the whole of the folder contents at ...
sites/all/libraries/tng/mods
  • overwritten the genlib.php file
  • renamed the tng/extensions/signature.php file

I still get the error message 

Quote

Fatal error: Cannot redeclare showSigPhoto() (previously declared in /home/mysite/public_html/sites/all/libraries/tng/extensions/signature.php:8) in /home/mysite/public_html/sites/all/libraries/tng/extensions/signature.php on line 8

This is so frustrating. All I did on the day of the crash was upgrade the signature extension cfg files. It seems this has crashed the whole of TNG. Is there anything I can do to get rid of the broken signature extension, so I can get mod manager up and running again?

This is really frustrating!

Link to comment
Share on other sites

I had a brainwave, and tried deleting the file ...

tng/extensions/signature.php

I am delighted to say that this worked and the site is up and running again. I'll try restoring the culprit mod later this week and see what happens. Thanks for all the help so far.

Link to comment
Share on other sites

If you want the Signature mod to work, you will need to restore genlib.php from a TNG distributed zip file and not from your backup where you evidently still have part of the mod installed.

The mods managed by the Mod Manager must be Uninstalled not just Deleted if you want to remove a mod.  Delete just deletes the file.  To remove the code installed by the mod you need to Uninstall the mod.  At this point, you likely need to restore genlib.php from the TNG upgrade or full install zip.

Link to comment
Share on other sites

Thanks Ken. I did that and also reinstalled the latest source file for the signature mod. Everything is now as it should be with no errors. Thanks for all your kind help.

To assist in return, during this process, I noticed that the guidelines at https://tng.lythgoes.net/wiki/index.php?title=Signature_Display seem to be out of date? Under the 'Automated install' heading, it says ...

Extract the signature_display.zip to your admin/mod_folder (V7) or mods (v8).

But when I click on the link to the source 'file signature_display_v11.0.2.2.zip', it confusingly downloads a cfg file rather than a zip file. This confused me at first, so I thought it might confuse others too, and be a candidate for updating the install guidance?

Any way very many thanks again to you and @Merv

Link to comment
Share on other sites

24 minutes ago, stuckagain said:

But when I click on the link to the source 'file signature_display_v11.0.2.2.zip', it confusingly downloads a cfg file rather than a zip file. This confused me at first, so I thought it might confuse others too, and be a candidate for updating the install guidance?

Where is this link that you refer to?  I just downloaded the signature_display_v11.0.2.2.zip from the Mod summary section in the upper right hand corner of the page, and it downloads a zip file that contains only the signature_display_v11.0.2.2..cfg which you need to copy to your mods folder.    All mods essentially are like that.  Some also contain a folder that includes modules.

Link to comment
Share on other sites

The top link in the Signature Display block on the right hand side ...

signature_display_v11.0.2.2.zip

Definitely gives me single .cfg file in my downloads folder and not a ZIP file. Just checked again

Link to comment
Share on other sites

Are you selecting Open on Zip files instead of Save As?  It is a zip file on the TNG Wiki, since .cfg files cannot be uploaded to the TNG Wiki

Link to comment
Share on other sites

40 minutes ago, stuckagain said:

The top link in the Signature Display block on the right hand side ...


signature_display_v11.0.2.2.zip

Definitely gives me single .cfg file in my downloads folder and not a ZIP file. Just checked again

If you're using a Macintosh, this is expected behaviour - the Mac OS unzips "safe" files automatically for you on download.

The .zip file is put into the Trash, leaving the unzipped .cfg file in the Downloads folder.

This is a setting in the General Tab of Safari Preferences

Roger

Link to comment
Share on other sites

Yep - that would explain it, I am on a Mac.

I am used to seeing zip files as a folder. I think the reason it confused me is that I have not before seen a zip file with just one file in it, hence the no folder scenario. On the basis that some other users might be MAC users, I wonder if it might be worth revising the installation note to explain what to do if you get a only get a CFG file, as opposed to the zip file that the installation guide talks about?

Many thanks for all the kind help.

Link to comment
Share on other sites

Well to me this also explains the extraneous folder in zip files created by Mac users that I cannot extract directly into my TNG/mods folder because the .cfg file is not in the correct location.

I guess we need to explain how zip files should be constructed (without MacOS folders in them and without folders) and how they should be extracted

Note that I almost always extract zip files directly on my hosting test sites.

Link to comment
Share on other sites

15 hours ago, Ken Roy said:

Well to me this also explains the extraneous folder in zip files created by Mac users that I cannot extract directly into my TNG/mods folder because the .cfg file is not in the correct location.

 

Not really - the fact Safari will unzip "safe" files if the setting is made in Safari's preferences is nothing to do with how different software, or the Mac OS itself creates .zip archives.

This is not an option on Chrome on Mac OS X - it keeps the file as a .zip file once it's downloaded.

Actually there is a setting in Chrome to "Always Open Files of this Type" that is visible in the contextual menu that comes up in the lower left corner where downloaded files are listed.

Roger

Link to comment
Share on other sites

Roger,

Maybe I was too cryptic in my post.  I often wondered why some mod zip files created by MacIntosh users were often wrapped inside a folder for the mod name such that the .cfg file is not in the root of the zip file but within a folder.  Never mind that there is often an extraneous ~MacOS folder

I will have to go back and look for an example, but when you extract the zip file into the TNG mods folder, the .cfg file is in a subfolder instead of within the mods folder, thus not recognized by the Mod Manager

Link to comment
Share on other sites

Roger,

As a matter of fact, your gmaps_change_pin_legend_v10.1.zip is one of the mods I refered to in that the .cfg file and associated subfolder and encapsulated within a gmaps_change_pin_legend_v10.1 folder, so if I want to unzip the files correctly, I have to NOT extract the whole zip file but navigate into the folder and unzip the .cfg file and subfolder

 

Link to comment
Share on other sites

That is what I consider "normal" behaviour for any .zip file containing more than one things on Mac OS X - if you expand it, it becomes a folder containing the items.

This screen shot shows what I see for 3 Mods downloaded - the first one is a single .cfg file which expanded from the .zip file, the next two are folders that expanded from the .zip file that each contain a file and a folder. That is just the way it works on Mac OS X I think - I don't think I have ever seen a .zip file expand into multiple components at the same level as the .zip file - if there are multiple files/folders in the .zip file, the .zip expands to become a folder containing all those items

Screen Shot 2018-03-19 at 10.23.33 PM.png

Roger

Link to comment
Share on other sites

Roger,

That may very well be true of zip files created by MacIntosh users.  My point is that if I need to document the quirk on how MacIntosh Safari extracts a mod zip file that only contains the .cfg file, then the the other behavior also needs to be documented.

By the way, I am not going to update 200+ mod articles on the TNG Wiki to change the install instructions there.

Link to comment
Share on other sites

3 hours ago, Ken Roy said:

That may very well be true of zip files created by MacIntosh users.

No, it's not .zip files created by Macintosh users - the screen shot I showed included a mod made by a Windows user that also extracted into a folder named for .zip file (mod-simple-seo-v11) and I've just now tried with one of Rick Bisbee's Mods and it too extracts into a folder with the name of the .zip file.

This is seemingly (and normal to me at least) behaviour of a .zip file that is unzipped on Mac OS X - regardless of who/what created the .zip file.

Roger

Link to comment
Share on other sites

Attached are screen captures of what WinZip shows for the gmaps_change_pin_legend_v10.1.zip where the cfg file and associated folder are not in the zip file directly but within a folder

MacIntosh_created_zipfile.png

and one has to navigate within the gmaps_change_pin_legend_v10.1 folder in order to extract just the .cfg file and its associated folder

MacIntosh_created_zipfile-2.png

 

This might be normal expected behavior on a MacIntosh but throws some of us for a loop when we extract the zip file into the TNG/mods folder and then go to the Mod Manager list screen and the mod does not show up

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...