Advertisement:

Author Topic: Can't Access Forum Profile  (Read 1371 times)

Offline pepa

  • Jr. Member
  • **
  • Posts: 192
Can't Access Forum Profile
« on: February 22, 2018, 12:53:49 AM »
If I as Admin or any users try to navigate to their forum profile they receive the following message in their browser:

"The www.reformaps.net.au page isn’t working

www.reformaps.net.au is currently unable to handle this request.
500"

Checked the error logs and they're clean.

Anyone know what's causing this?

Offline Aleksi "Lex" Kilpinen

  • A Peculiar Finn
  • Lead Support Specialist
  • SMF Super Hero
  • *
  • Posts: 18,739
  • Gender: Male
  • Don't worry, I'm n00b friendly
    • Aleksi.Kilpinen on Facebook
    • LexArma on GitHub
    • aleksi-kilpinen on LinkedIn
    • There's No Place Like 127.0.0.1
Re: Can't Access Forum Profile
« Reply #1 on: February 22, 2018, 01:08:51 AM »
A 500 error is an error on the server side, and should leave an entry in the server logs, try to locate them - or ask your host for them.
We need to know the error message, to be able to help.
A Finnish Support Specialist
 Happily running multiple SMF 2.0 installations.
  Fooling around with an i7 990X @ 3,47Ghz / 12Gb / Win 10 x64 / 3840x2160


How you can help SMF

"Before you allow people access to your forum, especially in an administrative position, you must be aware that that person can seriously damage your forum.
 Therefore, you should only allow people that you trust, implicitly, to have such access." -Douglas

Offline pepa

  • Jr. Member
  • **
  • Posts: 192
Re: Can't Access Forum Profile
« Reply #2 on: February 22, 2018, 01:17:00 AM »
A 500 error is an error on the server side, and should leave an entry in the server logs, try to locate them - or ask your host for them.
We need to know the error message, to be able to help.

Thanks Aleski ... this would appear to be the relevant error message:

"[Thu Feb 22 17:09:03.529821 2018] [:error] [pid 637191] [client 58.104.95.218:52135] PHP Fatal error:  Call to undefined function BetterProfile_Profile() in /home/psychol1/reformaps.net.au/forum/Sources/Profile-Modify.php on line 764"

Offline shawnb61

  • Developer
  • SMF Hero
  • *
  • Posts: 1,598
    • sbulen on GitHub
Re: Can't Access Forum Profile
« Reply #3 on: February 22, 2018, 01:26:36 AM »
Do you have the Better Profile mod installed?
Address the process rather than the outcome.  Then, the outcome becomes more likely.   - Fripp

Offline pepa

  • Jr. Member
  • **
  • Posts: 192
Re: Can't Access Forum Profile
« Reply #4 on: February 22, 2018, 01:40:58 AM »
Do you have the Better Profile mod installed?

No, I did install it recently due to a request by Dougie, but then uninstalled it ... has it left a problem behind?

Also, when I did install it, it didn't work.  Neither does Better Messages Menu.

Offline pepa

  • Jr. Member
  • **
  • Posts: 192
Re: Can't Access Forum Profile
« Reply #5 on: February 22, 2018, 02:00:00 AM »
Thanks shawnb61 ... you gave me the clue I needed.  The offending lines in Profile-Modify.php were:

   BetterMessages_Profile($profile_fields);
   BetterMessages_Profile($profile_fields);
   BetterProfile_Profile($profile_fields);

Just removed them and now all is OK.

Guess I better let Dougie know.

Offline dougiefresh

  • SMF Hero
  • ******
  • Posts: 2,859
  • Mod King
    • XPtsp.com Community
Re: Can't Access Forum Profile
« Reply #6 on: February 22, 2018, 10:56:03 AM »
Yeah, that's what happens when you uninstall mods in the wrong order, then force the uninstall through without paying attention to the errors....

In order to make sure you uninstall mods in the right order, I really recommend installing Arantor's Sortable Packages (and Installed Time) mod!  It's super helpful!

Offline pepa

  • Jr. Member
  • **
  • Posts: 192
Re: Can't Access Forum Profile
« Reply #7 on: February 22, 2018, 04:51:06 PM »
Yeah, that's what happens when you uninstall mods in the wrong order, then force the uninstall through without paying attention to the errors....

In order to make sure you uninstall mods in the right order, I really recommend installing Arantor's Sortable Packages (and Installed Time) mod!  It's super helpful!

Sorry Dougie, but I'm not guilty of what you suggest.  I only installed BetterProfileMenu after you asked me if it would work for me.  Installed it and it didn't work.  Now I find I can't uninstall it.  With regard to BetterMessages Menu I have only installed each new version after uninstalling the previous version ... and I have "never" uninstalled or installed any mod on SMF that has thrown up error messages when it runs the check immediately before the process.

If you are referring to the order of installing/uninstalling mods in general, I can't comment as I was unaware that some mods may have to be uninstalled before others, but, as above, for Better Messages and Better Profile, that was my process.

Offline Aleksi "Lex" Kilpinen

  • A Peculiar Finn
  • Lead Support Specialist
  • SMF Super Hero
  • *
  • Posts: 18,739
  • Gender: Male
  • Don't worry, I'm n00b friendly
    • Aleksi.Kilpinen on Facebook
    • LexArma on GitHub
    • aleksi-kilpinen on LinkedIn
    • There's No Place Like 127.0.0.1
Re: Can't Access Forum Profile
« Reply #8 on: February 23, 2018, 12:09:30 AM »
Sometimes on some server setups these things do just happen without clear cause, but if any errors in uninstallation come up, it can many times be solved by following the original installation order in reverse until the right package comes up.
A Finnish Support Specialist
 Happily running multiple SMF 2.0 installations.
  Fooling around with an i7 990X @ 3,47Ghz / 12Gb / Win 10 x64 / 3840x2160


How you can help SMF

"Before you allow people access to your forum, especially in an administrative position, you must be aware that that person can seriously damage your forum.
 Therefore, you should only allow people that you trust, implicitly, to have such access." -Douglas

Offline pepa

  • Jr. Member
  • **
  • Posts: 192
Re: Can't Access Forum Profile
« Reply #9 on: February 24, 2018, 12:17:28 AM »
Sometimes on some server setups these things do just happen without clear cause, but if any errors in uninstallation come up, it can many times be solved by following the original installation order in reverse until the right package comes up.

Thanks for your reply Aleksi, however I can't follow that process in this case as there have been 4 versions of BetterMessagesMenu installed the latest version is suddenly throwing up uninstall errors.  All the previous versions were uninstalled as soon as it was evident they didn't work, none of those threw out errors on uninstallation, but I can't install any of those previous versions as having the latest version installed prevents this.  So I'm presently stuck with bits of code I can't get rid of and don't know if they will eventually cause problems somewhere.  Not sure what to do?

Offline doug_ips

  • Jr. Member
  • **
  • Posts: 303
Re: Can't Access Forum Profile
« Reply #10 on: February 24, 2018, 08:48:53 AM »
Sometimes on some server setups these things do just happen without clear cause, but if any errors in uninstallation come up, it can many times be solved by following the original installation order in reverse until the right package comes up.

Thanks for your reply Aleksi, however I can't follow that process in this case as there have been 4 versions of BetterMessagesMenu installed the latest version is suddenly throwing up uninstall errors.  All the previous versions were uninstalled as soon as it was evident they didn't work, none of those threw out errors on uninstallation, but I can't install any of those previous versions as having the latest version installed prevents this.  So I'm presently stuck with bits of code I can't get rid of and don't know if they will eventually cause problems somewhere.  Not sure what to do?

You can check the mod xml file and undo the edits manually. Or you can overwrite your forum files with files from a freshly downloaded smf. Note to download the version that you are using and do not leave any install and/or upgrade files as they seem to pose a security issue. You must also note that doeing this will uninstall all mods. You can re install them again though.

Offline pepa

  • Jr. Member
  • **
  • Posts: 192
Re: Can't Access Forum Profile
« Reply #11 on: February 24, 2018, 04:49:22 PM »
Sometimes on some server setups these things do just happen without clear cause, but if any errors in uninstallation come up, it can many times be solved by following the original installation order in reverse until the right package comes up.

Thanks for your reply Aleksi, however I can't follow that process in this case as there have been 4 versions of BetterMessagesMenu installed the latest version is suddenly throwing up uninstall errors.  All the previous versions were uninstalled as soon as it was evident they didn't work, none of those threw out errors on uninstallation, but I can't install any of those previous versions as having the latest version installed prevents this.  So I'm presently stuck with bits of code I can't get rid of and don't know if they will eventually cause problems somewhere.  Not sure what to do?

You can check the mod xml file and undo the edits manually. Or you can overwrite your forum files with files from a freshly downloaded smf. Note to download the version that you are using and do not leave any install and/or upgrade files as they seem to pose a security issue. You must also note that doeing this will uninstall all mods. You can re install them again though.

Hi doug

Thanks for your suggestion, I'm learning a lot about SMF in a short time, it's all good : )

Checked, and there are three xml files.  One is the package-info.xml which doesn't write any changes.  The other two are "language_english.xml" which writes to Profile.English.php.  Easy to just remove that txt.

Dougiefresh Please Note:  The text has been written twice at the bottom of this file, so could be a previous uninstall from an earlier version left it behind.

and ... "install_20x.xml" which writes the following to Loap.php, Profile-Modify.php and PersonalMessage.php:

Code: [Select]
<file name="$sourcedir/Load.php">
<!-- loadUserSettings function -->
<operation>
<search position="before"><![CDATA['permissions' => array(),]]></search>
<add><![CDATA[
'bmm_mode' => isset($user_settings['bmm_mode']) ? $user_settings['bmm_mode'] : 0,]]></add>
</operation>
</file>
<file name="$sourcedir/Profile-Modify.php">
<operation>
<search position="after"><![CDATA[

$disabled_fields = !empty($modSettings['disabled_profile_fields'])]]></search>
<add><![CDATA[
BetterMessages_Profile($profile_fields);]]></add>
</operation>
<operation>
<search position="after"><![CDATA[ 'theme_settings',]]></search>
<add><![CDATA[ 'bmm_mode', 'hr',
]]></add>
</operation>
<operation>
<search position="before"><![CDATA[ 'ignore_boards',]]></search>
<add><![CDATA[
'bmm_mode',]]></add>
</operation>
</file>
<file name="$sourcedir/PersonalMessage.php">
<!-- MessageMain function -->
<operation>
<search position="before"><![CDATA['settings' => 'MessageSettings',]]></search>
<add><![CDATA[
'BetterMessages_ucp' => 'BetterMessages_Hook',]]></add>
</operation>

<!-- messageIndexBar function -->
<operation>
<search position="after"><![CDATA[// Do we have a limit on the amount of messages we can keep?]]></search>
<add><![CDATA[// If we are being called by the Better Messages mod, return with the array:
if (isset($_GET['sa']) && $_GET['sa'] == 'BetterMessages_ucp')
{
$context['pm_areas'] = $pm_areas;
return;
}

]]></add>
</operation>
</file>
</modification>

So if I remove those edits ... all will be OK?

Offline doug_ips

  • Jr. Member
  • **
  • Posts: 303
Re: Can't Access Forum Profile
« Reply #12 on: February 24, 2018, 04:55:45 PM »
Sometimes on some server setups these things do just happen without clear cause, but if any errors in uninstallation come up, it can many times be solved by following the original installation order in reverse until the right package comes up.

Thanks for your reply Aleksi, however I can't follow that process in this case as there have been 4 versions of BetterMessagesMenu installed the latest version is suddenly throwing up uninstall errors.  All the previous versions were uninstalled as soon as it was evident they didn't work, none of those threw out errors on uninstallation, but I can't install any of those previous versions as having the latest version installed prevents this.  So I'm presently stuck with bits of code I can't get rid of and don't know if they will eventually cause problems somewhere.  Not sure what to do?

You can check the mod xml file and undo the edits manually. Or you can overwrite your forum files with files from a freshly downloaded smf. Note to download the version that you are using and do not leave any install and/or upgrade files as they seem to pose a security issue. You must also note that doeing this will uninstall all mods. You can re install them again though.

Hi doug

Thanks for your suggestion, I'm learning a lot about SMF in a short time, it's all good : )

Checked, and there are three xml files.  One is the package-info.xml which doesn't write any changes.  The other two are "language_english.xml" which writes to Profile.English.php.  Easy to just remove that txt.

Dougiefresh Please Note:  The text has been written twice at the bottom of this file, so could be a previous uninstall from an earlier version left it behind.

and ... "install_20x.xml" which writes the following to Loap.php, Profile-Modify.php and PersonalMessage.php:

Code: [Select]
<file name="$sourcedir/Load.php">
<!-- loadUserSettings function -->
<operation>
<search position="before"><![CDATA['permissions' => array(),]]></search>
<add><![CDATA[
'bmm_mode' => isset($user_settings['bmm_mode']) ? $user_settings['bmm_mode'] : 0,]]></add>
</operation>
</file>
<file name="$sourcedir/Profile-Modify.php">
<operation>
<search position="after"><![CDATA[

$disabled_fields = !empty($modSettings['disabled_profile_fields'])]]></search>
<add><![CDATA[
BetterMessages_Profile($profile_fields);]]></add>
</operation>
<operation>
<search position="after"><![CDATA[ 'theme_settings',]]></search>
<add><![CDATA[ 'bmm_mode', 'hr',
]]></add>
</operation>
<operation>
<search position="before"><![CDATA[ 'ignore_boards',]]></search>
<add><![CDATA[
'bmm_mode',]]></add>
</operation>
</file>
<file name="$sourcedir/PersonalMessage.php">
<!-- MessageMain function -->
<operation>
<search position="before"><![CDATA['settings' => 'MessageSettings',]]></search>
<add><![CDATA[
'BetterMessages_ucp' => 'BetterMessages_Hook',]]></add>
</operation>

<!-- messageIndexBar function -->
<operation>
<search position="after"><![CDATA[// Do we have a limit on the amount of messages we can keep?]]></search>
<add><![CDATA[// If we are being called by the Better Messages mod, return with the array:
if (isset($_GET['sa']) && $_GET['sa'] == 'BetterMessages_ucp')
{
$context['pm_areas'] = $pm_areas;
return;
}

]]></add>
</operation>
</file>
</modification>

So if I remove those edits ... all will be OK?

You are welcome. I'm learning a lot about SMF in a short time as well.

I think that if you undo all the edits manually the issue might get resolved. However, I am speaking in theory as I do not use that mod. Whereas the ther method that I mentioned about overwriting your forum files will work 100%. I have tried it myself with success.

Have you tried to post at the support topic of that mod btw? Its developer can help you better I think.

Offline pepa

  • Jr. Member
  • **
  • Posts: 192
Re: Can't Access Forum Profile
« Reply #13 on: February 24, 2018, 05:12:55 PM »

You are welcome. I'm learning a lot about SMF in a short time as well.

I think that if you undo all the edits manually the issue might get resolved. However, I am speaking in theory as I do not use that mod. Whereas the ther method that I mentioned about overwriting your forum files will work 100%. I have tried it myself with success.

Have you tried to post at the support topic of that mod btw? Its developer can help you better I think.

Thanks again doug : ).  Yep I'm aware of the "other" method but it would be a lot of work as I've made many changes to my forum, all documented but still hours of work after I upload a "clean file set".  My forum isn't throwing up any error messages so I think I'll go with your xml edits suggestion.  If the worst happens I can always install a clean set from the large upgrade file.

I have posted in the relevant mod thread but I think dpugiefresh is really busy atm.  He did suggest using Arantor's Sortable Packages (and Installed Time) mod, which is a great mod, but didn't help at all with this situation.

I'll mark this topic as solved now, I'm pretty confident it is.
« Last Edit: February 24, 2018, 05:23:19 PM by pepa »

Offline pepa

  • Jr. Member
  • **
  • Posts: 192
Re: Can't Access Forum Profile
« Reply #14 on: February 25, 2018, 05:50:25 AM »
Thanks again for your suggestion doug-lps

Removed all the vagrant code from the files mentioned above and all is good with the forum, although I will still have to remove something from the db as there is a db_install.php file with this mod.

Interesting to note that there was leftover code in all the relevant files from uninstallations of previous versions of BetterMesagesMenu and were the uninstallations had "supposedly" been successful.

Now, as expected I guess, when I click uninstall for BetterMessagesMenu V1.4 it throws an error for every file.  So should I uninstall , which I believe won't do anything as I've already removed the code, but it will remove the 'installed' listing from the package manager?

Offline doug_ips

  • Jr. Member
  • **
  • Posts: 303
Re: Can't Access Forum Profile
« Reply #15 on: February 25, 2018, 08:27:08 AM »
Thanks again for your suggestion doug-lps

Removed all the vagrant code from the files mentioned above and all is good with the forum, although I will still have to remove something from the db as there is a db_install.php file with this mod.

Interesting to note that there was leftover code in all the relevant files from uninstallations of previous versions of BetterMesagesMenu and were the uninstallations had "supposedly" been successful.

Now, as expected I guess, when I click uninstall for BetterMessagesMenu V1.4 it throws an error for every file.  So should I uninstall , which I believe won't do anything as I've already removed the code, but it will remove the 'installed' listing from the package manager?

You are welcome pepa. If you removed the code manually the mod is searching for the code that adds and when it does not found it throws the error. I think you can safely uninstall it as it will not do anything but remove it from the installed listing of the package manager.

However, before you perform anything that has to do with the database, it would be best to first backup the database for just in case things will not go as planned, you can always roll back.