Support Forum

Unable to upload avatars, and an odd HTML bug.

TB Timothy Burton
Timothy Burton
Member

I’ve recently been running into a few odd issues with my forums, and suspect there may be a common, underlying issue causing these symptoms. We went through a process of changing hosts, and the person who was in charge of moving our website to the new host *might* have done something to cause these issue, but I don’t quite know if or what that would be. I do know that with our previous host, we were using nginx, and now we are using apache. I’m not an expert in web hosting by any means, and mainly deal with just the backend of our WP site.

The first issue is with avatars. The issue started with users unable to upload an avatar. I know that this was working prior to the host migration, but afterwards, it no longer works. The issue users were getting is “Sorry, there was a problem resizing the avatar.”

My avatar upload settings were set to 100000 file size and 100px image size. I know for sure that the images we attempted to upload were within these parameters. 

Then, I went into the SP settings and disabled “Display avatars” and “Enable avatar uploading”, saved the settings, then re-enabled both settings.

Now, no one can upload any avatars. Going to user profile>edit avatar doesn’t display any options to upload avatars, as if the settings were disabled (but they are enabled).  

My second issue is this very bizarre HTML bug where the HTML+images from my HOME page ‘injects’ itself into the buttons (like the private message, subscribed, watching, etc buttons), causing what appears to be the entirety of the contents from my home page to be overlayed on top of the forum page.

This only happens when a user is logged in, and doesn’t happen immediately. Simply by logging in, visiting the forums, and letting the page sit untouched will eventually lead to this bug popping up. Refreshing the page resets it ‘back to normal’, only for it to randomly occur again.

This happens for multiple users, on multiple browsers (confirmed to happen on FF and Chrome), even on multiple operating systems (happened both on my mac and PC). It also happens on different SP themes (I’ve seen it happen on the reboot and stacked themes).

Here are some images of what it looks like:

http://prnt.sc/c0ft3k

http://prnt.sc/c0fu4p

http://prnt.sc/c0fszo

Notice how in this following image, when I hover over any part of this bugged overlay, it shows that it links to the inbox (the private message plugin for SP), which is why I say that it’s ‘injecting’ HTML into the various buttons.

http://prnt.sc/c0ftxc

 

If you want to see this bug in action, then visit the following site, register as a user, then visit the forums and just wait. It will eventually happen.

www.rebirthgaming.org

15 Answers

New Answer

MP Mr Papa
Mr Papa
Member

what versions of wp and simple press??

seems like ~100k size would be big enough… what size were they?  when you get the upload failed message, can you check your wp error log and see if any more info is provided there?

for second issue (which I am not entirely sure I fully understand – screenshots dont always tell the story), was everything working fine on old server with this theme?? and just started after moving?  

of course, I am not logged in…  if you wanted to create some temp credentials and pm them to yellow swordfish and myself, we could take a closer look…

does the second issue also occur if you do a temp switch to the default  wp theme?

on a lot of the forum pages, I am seeing jquery errors which could be part of the problem…

also, I notice that all of your topic slugs are numeric ids…  are you using our topic id permalink plugin to make this happen?

YS Yellow Swordfish
Yellow Swordfish
Member

I think @mr-papa meant check the ‘SP Error Log’ (Form admin > toolbox) regarding the avatar upload and look for errors. It is best to clear the error log out first before trying the upload so that we can see if anything gets generated by the actual act in isolation.

As to the display issue then this can happen (I have seen it) if you have our AutoUpdate feature turned on but there are script errors occurring. So creating an account for us to check it out is the way to go. As a policy we do not register on users sites but always ask them to create an account we can use and PM the credentials to us.

TB Timothy Burton
Timothy Burton
Member

I didn’t clear out the error log as suggested, since I can’t actually attempt to upload avatars anymore. But, I did pinpoint errors around the time when one of my users was getting an error when attempting to change his avatar. (My forums rarely get used, so it made it easy to isolate the error in the log)

As stated before, after having another one of my users report to me that he was receiving an error when attempting to upload an avatar, I went into the settings and disabled the ability to upload avatars, then reenabled it to see if it would fix it. However, even though the settings are set to allow for avatars, users are no longer given the option to do so.

Enabled in the settings: http://prntscr.com/c0ms3p

Unable to upload: http://prntscr.com/c0mtuz

Errors that generated when my user attempted to upload an avatar last night, and received the “Sorry, there was a problem resizing the avatar.”

http://prntscr.com/c0muf0

 

So, just to clarify: A user had the option in profile>edit avatar to actually upload an avatar. When they attempted to upload their image (it was a 32×32 image, and my limits were set to 100×100), they got “Sorry, there was a problem resizing the avatar.”

The errors posted above were then generated.

I went into the SP settings, disabled avatars and disabled the ability to upload them. Saved settings. Re-enabled both settings. Saved settings. Now the option to upload any avatars at all is gone.

 

also, I notice that all of your topic slugs are numeric ids…  are you using our topic id permalink plugin to make this happen?

Yep, I am: http://prntscr.com/c0n2p7

does the second issue also occur if you do a temp switch to the default  wp theme?

Not quite sure if I can just straight up disable my theme, but I did switch it to the css-only theme. And yes, it still happens.

After talking to someone else about this, they found out the cause:

http://prntscr.com/c0n69s

Not entirely sure how or why, though. I’ll continue to investigate on my end.

YS Yellow Swordfish
Yellow Swordfish
Member

Re-enabling Avatars:
You say you have turned back on the option to upload avatars but did you reset the avatar priorities? They are saying the first priority is to use the SP Defaults and when that it is the first priority you will never get any other options as they have no relevance. So check the priorities on the avatar options admin panel and change as required.

Then when re-enabled can you do the error log check as described above. The front-end message is not the error – it is an informational statement.

Scripts:
You DO have an error on the page load. This is a jQuery error and as soon as it hits the scripts then jQuery closes down and will not process any other requests. So there is much that may not work as expected. To keep it simple here is a screenshot of the script error:

Screen-Shot-2016-08-02-at-13.49.01.png

I have no idea which one of your rather large number of scripts is causing this error. I can do a google search to see if anything turns up but something you have active is the root cause and that is causing issues.

TB Timothy Burton
Timothy Burton
Member

but did you reset the avatar priorities?

Woops! I fixed my priorities, and the ability to upload avatars has been restored. However, I cleared my log, attempted to upload an avatar, and received the same front-end error. Nothing was logged in my error log coinciding with the attempt.

 

Ok, for the script error, I tried a few things:

First, I went through and updated what few plugins had updates pending (probably should have done this to begin with…) 

That didn’t help.

Then, I disabled a plugin that I suspected to be the cause (Sidebar Login Widget, since it ties into login stuff and uses Ajax), but the error still occurred. 

At this point, I’m taking shots in the dark and following clues, so I’ll continue to investigate on my end.

YS Yellow Swordfish
Yellow Swordfish
Member

Well I have done a little reading on this error. WP 4.5 updated the jQuery version (as it does when they become available) and it looks like the error you are receiving is, in all probability, down to a WP theme or plugin that has not ben updated to cater for jQuery changes.

The WordPress team do put out documentation on such changes for theme and plugin authors but sadly, some of those authors do not always update their code as they should or in good time. What the item may be, however, is a matter for some detective work.

However – the first port of call if it were me, would be to ensure that all my WP components were up to date. I do not know, of course, if you have any updates pending but if you do it would be worth applying them in case this error has been picked up and corrected.

As it is not entirely our of the question that the avatar issue is linked to the stalled use of jQuery then getting a clean base is really the first priority.

TB Timothy Burton
Timothy Burton
Member

Alright, so quick update as to not keep you wondering.

I’ve been having quite a fiasco with my site. It’s like I opened a whole can of worms.

Good news (sort of) is that I can get avatar uploads to work by disabling the quality reduction upon resizing function. Not sure if this is a necessary component, but as long as user upload an image within the size/dimension parameters I’ve set, then it works, and that’s all that matters to me. 

Bad news is that the script error seems to be embedded deep into my site. Still not entirely sure what’s the cause, and I think this is where my issue starts to… not fall within SP territory. You’re welcome to provide more assistance (and would be greatly appreciated), but I can understand if you don’t since this probably is NOT an issue with SP directly.

Basically, I’ve pinpointed the issue Visual Composer. I’ll spare you the gory details, but even after trying pretty much everything I can think of, nothing seems to work. Even disabling the VC plugin results in the CSS on some parts of the forums to break. It almost feels like spaghetti code.

I think the only fix for my script problem is to either use a different theme, or to hope that my theme author fixes and releases an update.

Anyways, I’m gonna see if the folks over on the WP forums can help me out with this.

Thanks.

MP Mr Papa
Mr Papa
Member

please let us know what you find…  or if we can help…

YS Yellow Swordfish
Yellow Swordfish
Member

My own opinion – for what it is worth – is that you should take the case specifically to the Visual Composer team IF this is the source of the script error. I can conform 100% that the code that is causing the problem is no longer supported and any plugin using it should have been updated at the same time as WP 4.5.

I don’t know what Visual Composer is to be honest – one day I must take a look at it. But I do know we have had issues in the past raised here (a quick search this morning threw up a few topics) and it does appear to spawn an awful lot of scripts as I saw when looking at the HTML source of your website.

You really should make then aware of this issue…

As to the avatar resizing. This itself may very well be down to the script engine being stalled by the error. We have no other reports of resizing being an issue and evidence that it is used regularly. If, when the scripts are sorted, it continues then do come back and shout. And as Mr Papa said above – please do keep us in the loop!

TB Timothy Burton
Timothy Burton
Member

For future reference, Visual Composer is a site building plugin. It’s pretty powerful, but it also means it comes with a lot of scripts and whatnot to drive it.  

Anyways, I’m totally at a loss now.

Last night, I managed to get a hold of an updated version of both my theme and VC. The thing is, my theme was built with VC in mind, so it made it quite difficult to simply disable VC without the theme throwing a fit.

But, even after I updated both my theme and VC, the issues persisted.

Here’s where things get weird.

This morning, I decided to just give up on my theme. I grabbed another theme – this one was pretty light weight and simple, and didn’t come with a bunch of extra stuff packaged into it. So, I switched my site’s theme to this new one. With VC disabled, I watched my forums again. Guess what. It bugs out. This time, however, it just goes entirely white.

Then, I completely removed VC from my site – I uninstalled it entirely (oddly, I couldn’t uninstall it from my WP backend and instead had to delete the plugin via FTP)

Went to my forums, waited – and it bugged out. Again.

To make sure it wasn’t any of my other plugins, I disabled ALL of them except for Simple Press. And… it still bugs out!

This is the error that pops up in console:

http://prntscr.com/c1k422

To be clear, I have a brand new theme, visual composer has been completely uninstalled, and the only WP plugin enabled is SP.

Could it be a SP plugin doing all of this?

Edit: I’m going to log out of my site and watch my forum page to see if the error pops up while logged out. Error didn’t occur while logged out.

Edit 2: Since this seems to be a classic WP white screen of death, I enabled logging. This is what I got in the logs:

[04-Aug-2016 16:12:49 UTC] PHP Notice: Undefined index: editor in /var/www/clients/client1/web1/web/wp-content/sp-resources/forum-plugins/captcha/sp-captcha-plugin.php on line 46
[04-Aug-2016 16:12:49 UTC] PHP Notice: Undefined index: editor in /var/www/clients/client1/web1/web/wp-content/sp-resources/forum-plugins/post-multiple/sp-post-multiple-plugin.php on line 44
[04-Aug-2016 16:12:49 UTC] PHP Notice: Undefined index: editor in /var/www/clients/client1/web1/web/wp-content/sp-resources/forum-plugins/post-preview/sp-preview-plugin.php on line 38
[04-Aug-2016 16:12:49 UTC] PHP Notice: Undefined index: editor in /var/www/clients/client1/web1/web/wp-content/sp-resources/forum-plugins/topic-expire/sp-topic-expire-plugin.php on line 55

So, I went in and disabled those SP plugins. Now to play the waiting game and let my forums sit idle, logged in, and see if the error occurs again.

Edit 3: After disabling those plugins, then waiting with my forum page idle while logged in, my screen went white and these errors generated in the log:

[04-Aug-2016 12:31:11 America/New_York] PHP Notice: Undefined index: editor in /var/www/clients/client1/web1/web/wp-content/plugins/simple-press/forum/content/forms/sp-form-topic.php on line 16

YS Yellow Swordfish
Yellow Swordfish
Member

Well – first thing – the forum looks fine to me and seems to be fully functional. At least I am seeing no errors in the script console so that’s good. So – not seeing your ‘white’ screen and not seeing your odd script error (and I don’t know what the VM… script component in the error you reported is by the way but not an SP script).

I opened a new topic in the ‘Off Topics’ forum to test – you may want to delete it.

The message regarding the editor is not an error = it is a notice and is harmless except for the annoyance. 

Try this: Go to the forum admin > Options > Global Settings and over on the right is a default editor selection list. Make sure one is ticked and then update the panel – update it anyway in fact.

However, this notice is showing up on the front page of the forum. This means that you either have WP_DEBUG turned on in your WP config file – or – your PHP is not set to not display notices. This would be rare but we have seen iot before. PHP should NEVER print notices, warnings or errors to the screen except in a development and controlled environment. If this is not the case you need to talk to your host about getting it set properly.

YS Yellow Swordfish
Yellow Swordfish
Member

Ah  I see you get the error at the autoupdate time. This VMxxxx (I see different numbers) is a mystery to me. Clearly it is hijacking the Ajax calls in some way.  Does this mean anything to you?

TB Timothy Burton
Timothy Burton
Member

So – not seeing your ‘white’ screen and not seeing your odd script error

The white screen only seems to occur when you’re logged in and sitting at rebirthgaming.org/forums

It’ll happen after a few minutes of just leaving the page sit idle.

However, this notice is showing up on the front page of the forum.

Yea, I enabled that to see what errors were popping up. I’ve disabled it now though, now that I got an error log to generate.

over on the right is a default editor selection list. Make sure one is ticked

Done and done. It was plain text, I switched it to TinyMCE

then update the panel – update it anyway in fact.

Do you suspect this could be related? I updated it, so we shall see what happens. I’ll leave my forum main page loaded and see if I get a white screen or not.

Also, when I updated the panel, this showed up briefly:

http://prntscr.com/c1m5y6

TB Timothy Burton
Timothy Burton
Member

Yellow Swordfish said
Ah  I see you get the error at the autoupdate time. This VMxxxx (I see different numbers) is a mystery to me. Clearly it is hijacking the Ajax calls in some way.  Does this mean anything to you?  

I’m not entirely sure… Someone else was looking into my issue before, and said that Ajax was throwing an infinite callback to the home page or something.

VM. Is that Virtual Machine?

By the way, I do have complete access to my host/server, so if you suspect it’s related to something in how the server is set up, please do tell and I’ll speak to the person who’s managing our server about it.