News:

Wondering if this will always be free?  See why free is better.

Main Menu

Attachments

Started by Bigguy, October 29, 2020, 09:43:08 AM

Previous topic - Next topic

Bigguy

My users are reporting to me that they can not upload attachments. All they get when they try is a block of code in a red box but this does not produce errors in the log files. I can post attachments just fine. Just not my members.


Bigguy

Yup, OP is from my forum so maybe he is talking about it. Didn't see that before I posted sorry.

shawnb61

Not seeing it...

It might help to have that red text...
Address the process rather than the outcome.  Then, the outcome becomes more likely.   - Fripp

lurkalot

Quote from: shawnb61 on October 29, 2020, 11:52:29 AM
Not seeing it...

It might help to have that red text...

Does it for me as well on Bigguy's site.  Here's the red text,

Quotetinyportal2.png <!DOCTYPE html> <html lang="en-US"> <head> <meta charset="UTF-8"> <link rel="stylesheet" href="https://www.smfhelper.com/Themes/default/css/index.css?smf21rc3_1603387703"> <link rel="stylesheet" href="https://www.smfhelper.com/Themes/default/css/jquery.custom-scrollbar.css?smf21rc3_1603387703"> <link rel="stylesheet" href="https://www.smfhelper.com/Themes/default/css/jquery.sceditor.css?smf21rc3_1603387703"> <link rel="stylesheet" href="https://www.smfhelper.com/Themes/default/css/hof.css?smf21rc3_1603387703"> <link rel="stylesheet" href="https://www.smfhelper.com/Themes/default/css/responsive.css?smf21rc3_1603387703"> <style> img.avatar { max-width: 100px; max-height: 100px; } .postarea .bbc_img { max-width: 600px; } .postarea .bbc_img { max-height: 800px; } </style> <script> var smf_theme_url = "https://www.smfhelper.com/Themes/default"; var smf_default_theme_url = "https://www.smfhelper.com/Themes/default"; var smf_images_url = "https://www.smfhelper.com/Themes/default/images"; var smf_smileys_url = "https://www.smfhelper.com/Smileys"; var smf_smiley_sets = "fugue,alienine,smfh"; var smf_smiley_sets_default = "fugue"; var smf_scripturl = "https://www.smfhelper.com/index.php"; var smf_iso_case_folding = false; var smf_charset = "UTF-8"; var smf_session_id = "194adec7e027b009e8f83b44a66a2f18"; var smf_session_var = "a3d39bcd4"; var smf_member_id = 3; var ajax_notification_text = 'Loading...'; var help_popup_heading_text = 'A little lost? Let me explain:'; var banned_text = 'Sorry lurkalot, you are banned from using this forum!'; var smf_txt_expand = 'Expand'; var smf_txt_shrink = 'Shrink'; var smf_quote_expand = 100; </script> <script src="https://ajax.googleapis.com/ajax/libs/jquery/3.5.1/jquery.min.js?smf21rc3_1603387703"></script> <script src="https://www.smfhelper.com/Themes/default/scripts/smf_jquery_plugins.js?smf21rc3_1603387703"></script> <script src="https://www.smfhelper.com/Themes/default/scripts/jquery.custom-scrollbar.js?smf21rc3_1603387703"></script> <script src="https://www.smfhelper.com/Themes/default/scripts/script.js?smf21rc3_1603387703"></script> <script src="https://www.smfhelper.com/Themes/default/scripts/theme.js?smf21rc3_1603387703"></script> <script src="https://www.smfhelper.com/Themes/default/scripts/jquery.atwho.min.js?smf21rc3_1603387703" defer></script> <script src="https://www.smfhelper.com/Themes/default/scripts/jquery.caret.min.js?smf21rc3_1603387703" defer></script> <script src="https://www.smfhelper.com/Themes/default/scripts/tinyportal/tinyPortalMentions.js?smf21rc3_1603387703" defer></script> <script src="https://www.smfhelper.com/Themes/default/scripts/alerts.js?smf21rc3_1603387703"></script> <script> var new_alert_title = "SMF Helper"; var alert_timeout = 10000; var smf_you_sure ='Are you sure you want to do this?'; </script> <title>SMF Helper</title> <meta name="viewport" content="width=device-width, initial-scale=1"> <meta property="og:site_name" content="SMF Helper"> <meta property="og:title" content="SMF Helper"> <meta name="keywords" content="SMF support,modifications,help,themes,tech,computers,downloads,showcase,articles "> <meta property="og:description" content="SMF Helper"> <meta name="description" content="SMF Helper"> <meta name="theme-color" content="#557EA0"> <meta name="robots" content="noindex"> <link rel="help" href="https://www.smfhelper.com/index.php?action=help"> <link rel="contents" href="https://www.smfhelper.com/index.php"> <link rel="search" href="https://www.smfhelper.com/index.php?action=search"> <link rel="alternate" type="application/rss+xml" title="SMF Helper - RSS" href="https://www.smfhelper.com/index.php?action=.xml;type=rss2"> <link rel="alternate" type="application/atom+xml" title="SMF Helper - Atom" href="https://www.smfhelper.com/index.php?action=.xml;type=atom"><meta name="viewport" content="width=device-width, initial-scale=1.0"/><link rel="stylesheet" type="text/css" href="https://www.smfhelper.com/Themes/default/css/tp-style.css?v200" /><link rel="stylesheet" type="text/css" href="https://www.smfhelper.com/Themes/default/css/tp-responsive.css?v200" /><link rel="stylesheet" type="text/css" href="https://www.smfhelper.com/Themes/default/css/tp-custom.css?v200" /> <style type="text/css"> .block_leftcontainer, .block_rightcontainer, .block_topcontainer, .block_uppercontainer, .block_centercontainer, .block_frontcontainer, .block_lowercontainer, .block_bottomcontainer { padding-bottom: 4px; } #tpleftbarHeader { margin-right: 4px; } #tprightbarHeader { margin-left: 4px; } </style> <script type="text/javascript"><!-- // --><![CDATA[ var tpPanels = new Array(); function togglepanel( targetID ) { var pstate = 0; var panel = targetID; var img = "toggle_" + targetID; var ap = 0; if ( document.getElementById && (0 !== panel.length) ) { target = document.getElementById( panel ); if ( target !== null ) { if ( target.style.display == "none" ) { target.style.display = ""; pstate = 1; removeFromArray(targetID, tpPanels); document.cookie="tp_panels=" + tpPanels.join(",") + "; expires=Wednesday, 01-Aug-2040 08:00:00 GMT"; var image = document.getElementById(img); if(image !== null) { image.src = 'https://www.smfhelper.com/Themes/default/images/tinyportal/TPupshrink.png';; } } else { target.style.display = "none"; pstate = 0; tpPanels.push(targetID); document.cookie="tp_panels=" + tpPanels.join(",") + "; expires=Wednesday, 01-Aug-2040 08:00:00 GMT"; var image = document.getElementById(img); if(image !== null) { image.src = 'https://www.smfhelper.com/Themes/default/images/tinyportal/TPupshrink2.png';; } } } } } function removeFromArray(value, array){ for(var x=0;x<array.length;x++){ if(array

shawnb61

Are you both on tinyportal?
Address the process rather than the outcome.  Then, the outcome becomes more likely.   - Fripp

lurkalot

Quote from: shawnb61 on October 29, 2020, 02:02:51 PM
Are you both on tinyportal?

Yes that's on Bigguys site which is running TP. 

I don't have that on issue my own sites running the same setup.

shawnb61

Shambles - was your site on tinyportal?

I couldn't read the other screenshot, but the top looked the same...

Looks like insertion of the logo is doing something...  Might also be theme related?
Address the process rather than the outcome.  Then, the outcome becomes more likely.   - Fripp

lurkalot

Quote from: shawnb61 on October 29, 2020, 02:09:22 PM
Shambles - was your site on tinyportal?

I couldn't read the other screenshot, but the top looked the same...

Looks like insertion of the logo is doing something...  Might also be theme related?

Funny you should mention the logo Shawn.  https://www.smfhelper.com/index.php?topic=737.msg5813#msg5813

shawnb61

Did the problem go away?

Bigguy - what did you do?
Address the process rather than the outcome.  Then, the outcome becomes more likely.   - Fripp

Bigguy

The logo was just made wrong that's all. It did honestly look like crap, so I fixed how it looked, no code behind it. Also, I am running the new tp 2.0 not the older one, so that might make a difference, not sure.

lurkalot

Quote from: Bigguy on October 29, 2020, 06:41:13 PM
The logo was just made wrong that's all. It did honestly look like crap, so I fixed how it looked, no code behind it. Also, I am running the new tp 2.0 not the older one, so that might make a difference, not sure.

Sorry Bigguy, I assumed you were having bigger issues with the logo.   If you Un-install TP I'll test the attachments again.  ;)

Bigguy

TP was uninstalled and attachments tested and they still do not work. So something must be up with SMF. Unless it's a different mod I have installed which I can't see that really.

lurkalot

Yep it was exactly the same without TP installed.

Was this the release version of RC3, or a later one from GitHub after the official release?

Bigguy

After the official release. Not sure how long after but it was not the official release that I used. It was after that.

shawnb61

Does it behave the same on all themes?
Address the process rather than the outcome.  Then, the outcome becomes more likely.   - Fripp

Bigguy

I don't have any themes installed. All I did was a bit of css work to change the colors.

Bigguy

I may have figured it out. I need a member to post an attachment.

lurkalot

Quote from: Bigguy on October 30, 2020, 09:53:16 PM
I may have figured it out. I need a member to post an attachment.

Still getting the red text issue Bigguy.  Two of us have now tried since with the same result.

lurkalot

Try attaching a image as a regular member and see if you get the same result.  I'm guessing you don't see it logged in as admin. 

Bigguy

Well damn. Maybe it needs updated again. I will go through my mods and see whats up if anything.

shawnb61

I still cannot reproduce, even using regular profiles, etc.
Address the process rather than the outcome.  Then, the outcome becomes more likely.   - Fripp

lurkalot

Quote from: shawnb61 on October 31, 2020, 06:35:10 PM
I still cannot reproduce, even using regular profiles, etc.

Bigguy's site is the only one I've seen with the issue. 

Bigguy

I uninstalled the gallery mod. That is the only mod that was installed that you could upload to besides SMF. So maybe it was that. I have not tested as I deleted my test user.

lurkalot

Quote from: Bigguy on October 31, 2020, 07:27:19 PM
I uninstalled the gallery mod. That is the only mod that was installed that you could upload to besides SMF. So maybe it was that. I have not tested as I deleted my test user.

Bigguy, problem is still there unfortunately.   :(

Bigguy

Ok, well the only other edits I did was to color in the css so I will re-install when I get home tomorrow.

shawnb61

Quote from: Bigguy on October 31, 2020, 11:02:11 PM
Ok, well the only other edits I did was to color in the css so I will re-install when I get home tomorrow.

Are you sure there were no template changes?  Especially around Display.template.php?  I would compare that to the vanilla version...
Address the process rather than the outcome.  Then, the outcome becomes more likely.   - Fripp

Bigguy

No changes other than what mods did. I only have two installed right now. Tp, which was tested by uninstalling and trying attachments, which still did not work. The other is the updated version of Simple Audio Video imbedder that I just installed today.

Bigguy

I just updated the forum from GH now. I created a test user so I could test out the attachments as a regular user. I have two screenshots. Both are of the posts I tried. admin.png is me as an admin typing a post. smfhtest.png is of the new test user. My question is this:
Why does the text in the post look different from the admin shot to the member shot. It may have something to do with attachments but I am not sure. It's really weird.

shawnb61

Is the red text problem gone?
Address the process rather than the outcome.  Then, the outcome becomes more likely.   - Fripp

Bigguy

No it's not. I just thought it may have something to do with why the text in those 2 post boxes is different. It should not be different like that between Admin and members should it ??

Bigguy

Also I noticed a line in that text saying that smfhtest (my test user) was banned from the forum, which he is not as it is just a new user I created.

Bigguy

It also says it in this thread in the post that Lurkalot posted:

'Sorry lurkalot, you are banned from using this forum!';

Bigguy

Account activated. I have to step out for about half hour. I'll be back soon.

shawnb61

Quote from: Bigguy on November 02, 2020, 10:57:51 AM
It also says it in this thread in the post that Lurkalot posted:

'Sorry lurkalot, you are banned from using this forum!';

That is a dump of what appears to be multiple .js scripts that were for some reason not loaded properly.  Instead of being passed to your browser for execution, they ended up displayed as html content...  Another clue a template is broken, in this instance, my guess is a missing script tag somehow.

If you see that error in earnest, it should be accompanied with an http500 message somewhere in your apache log...
(ref: https://github.com/SimpleMachines/SMF2.1/blob/415d16f7172a31072bac466a2e20d11f149c8322/Themes/default/scripts/script.js#L345)
Address the process rather than the outcome.  Then, the outcome becomes more likely.   - Fripp

shawnb61

I still cannot duplicate on my site.  But I did find a few things out...

I suspect there is a permissions issue of some sort.  The attached is the message it is trying to display.

Dropzone (the 3rd party open source we use to make uploading attachments easier), instead of displaying the error, is coughing up the html...  Other sites have experienced this before:
https://stackoverflow.com/questions/39761736/dropzone-image-upload-error-display-how-to-remove-error

We did update the min version of jquery recently, used by dropzone...  Worth making sure we don't have a jquery issue here. 

So... 
- Please double-check all SMF permissions.
- Double-check the attachment folder setting, & attachment folder OS-level permissions.
- Do you have a custom jquery library specified?  Under Features & Options | General? 

If you find anything, please share...

I logged this up on GitHub, to make sure we look into Dropzone error reporting:
https://github.com/SimpleMachines/SMF2.1/issues/6328
Address the process rather than the outcome.  Then, the outcome becomes more likely.   - Fripp

shawnb61

One more tidbit...  The attached is how I found the permissions error.  A 403 was in the console, I clicked on that link...
Address the process rather than the outcome.  Then, the outcome becomes more likely.   - Fripp

Bigguy

I will check permissions on SMF and in cpanel. No, I did not have a custom jquery library specified but will try that as well. I shoulda went to the console, damn it, lol. I'll share anything I find, thank you sir.

shawnb61

It's also interesting that that url gets a 403 when invoked from dz/js but not when you type it in the browser url bar. 

It might also be worth it to talk with your host about mod_sec rules that may have been enabled. 
Address the process rather than the outcome.  Then, the outcome becomes more likely.   - Fripp

Bigguy

I re-uploaded the Sources and Themes folder and changed the jquery library. Still no change. I will check permissions now. I run this server so there is no host really other than NameCheap.

Bigguy

Changed permissions on the attachments folder to 777 and still nothing. It was working the other day as far as I know. I'm not sure what the hell is going on. Mod sec is not the problem either as far as I know.

shawnb61

Are you using post moderation?

(Check under Admin | Members | Permissions | Post Moderation...)
Address the process rather than the outcome.  Then, the outcome becomes more likely.   - Fripp

landyvlad

Quote from: Bigguy on October 29, 2020, 11:33:57 AM
Yup, OP is from my forum so maybe he is talking about it. Didn't see that before I posted sorry.

Yes indeed, that is what I'm talking about!
"Put as much effort into your question as you'd expect someone to give in an answer"

Please do not PM, IM or Email me with questions on astrophysics or theology.  You will get better and faster responses by asking homeless people in the street. Thank you.

Be the person your dog thinks you are.

Bigguy

No, no post moderation.

Bigguy

This is fixed now. I removed a bit of code. This has been reported on GH.

shawnb61

Confirmed.  This is a post-RC3 issue.  RC3 is fine.
Address the process rather than the outcome.  Then, the outcome becomes more likely.   - Fripp

Bigguy

I updated from GH after RC3 was released...why did I get this bug. Maybe the update didn't take fully.

shawnb61

That makes sense...   RC3 was fine, & didn't have the issue (which is why Ihad a problem trying to reproduce it...).  That change was up on github after rc3.
Address the process rather than the outcome.  Then, the outcome becomes more likely.   - Fripp

Bigguy

Aah, ok. That's cool then. Guess that's life on the bleeding edge, lol.

Bigguy

Now that attachments are working, there is still a bug. It will not count how many people have viewed the attachment. I just posted one on my site and viewed it twice and a member has viewed it once and it still says 0 people have viewed the attachment.

Advertisement: