Advertisement:

Author Topic: Inserting an attachment - doesn't work  (Read 2113 times)

Offline mantu2

  • Semi-Newbie
  • *
  • Posts: 45
Inserting an attachment - doesn't work
« on: March 31, 2020, 01:41:14 AM »
Hi,

I found out that the attachment sending is not working in my forum. See picture. I can open the menu and find the picture I want to upload but it just doesn't. Nothing happens when pressing any of the buttons shown in the picture. No errors occurs to log. And as you can see, the attachment menu is not regular looking. Something puts it to the left side. Only plugin I have is the ad-management, but that has been installed for long time and have not been a problem - as far as I know. So. Just confused what to do.

Offline Kindred

  • The Mean One
  • Support Specialist
  • SMF Legend
  • *
  • Posts: 59,218
  • Gender: Male
    • Kindred-999 on GitHub
Re: Inserting an attachment - doesn't work
« Reply #1 on: March 31, 2020, 04:55:44 PM »
sounds like a javascipt error/conflict
Please do not PM, IM or Email me with support questions.  You will get better and faster responses in the support boards.  Thank you.

Offline mantu2

  • Semi-Newbie
  • *
  • Posts: 45
Re: Inserting an attachment - doesn't work
« Reply #2 on: April 01, 2020, 05:56:30 AM »
Well that didn't help too much.

Offline mantu2

  • Semi-Newbie
  • *
  • Posts: 45
Re: Inserting an attachment - doesn't work
« Reply #3 on: April 01, 2020, 06:29:40 AM »
I found out that this is somehow theme related issue. Can anybody help where to start fixing?

Offline Kindred

  • The Mean One
  • Support Specialist
  • SMF Legend
  • *
  • Posts: 59,218
  • Gender: Male
    • Kindred-999 on GitHub
Re: Inserting an attachment - doesn't work
« Reply #4 on: April 01, 2020, 10:48:36 AM »
well, you're not giving much information for us to help you...
Please do not PM, IM or Email me with support questions.  You will get better and faster responses in the support boards.  Thank you.

Offline mantu2

  • Semi-Newbie
  • *
  • Posts: 45
Re: Inserting an attachment - doesn't work
« Reply #5 on: April 02, 2020, 04:21:37 AM »
The problem has something to do with css overflow command. When using (with Firefox) Inspect element, the problem is solved by ruling out "overflow: auto" from <dl id="postAttachement2">. However, Firefox refers to file Themes/mytheme/css/minified_df..... which is not a place to do modifications. If making the the same in theme editor (to index.css), other areas also effected.

I hope this scratch of information is enough for a start.

Offline Bobby

  • Jr. Member
  • **
  • Posts: 193
  • Gender: Male
  • I'm SMF Fan!
    • layphatvn on Facebook
    • Lạy Phật
Re: Inserting an attachment - doesn't work
« Reply #6 on: April 03, 2020, 08:37:17 PM »
1) Is your browser enable/disable javascript?
2) Did you config your attachments folder correctly? Plz check it on ACP —> Forum —> Attachment settings

Offline mantu2

  • Semi-Newbie
  • *
  • Posts: 45
Re: Inserting an attachment - doesn't work
« Reply #7 on: April 05, 2020, 07:23:18 AM »
All seems to be good. No javascript blocked on browser (If so, I could not even put files to this forum). Attachment folder seems to be fine as well. Only small error was there that I've limited to attachement size. The error says that the "php.ini setting 'post_max_size' might not suport this".

I did also check how it is with other browsers. So far Edge is the only one which seems to work fine. I tested Firefox (on Linux and Windows), Chromium, Chrome and Vivaldi. All looks the same as shown in the first post.

Offline Bobby

  • Jr. Member
  • **
  • Posts: 193
  • Gender: Male
  • I'm SMF Fan!
    • layphatvn on Facebook
    • Lạy Phật
Re: Inserting an attachment - doesn't work
« Reply #8 on: April 06, 2020, 07:08:46 AM »
Only small error was there that I've limited to attachement size. The error says that the "php.ini setting 'post_max_size' might not suport this".
Oh, it could be error by php settings! Contact your hosting provider to change them!

Offline mantu2

  • Semi-Newbie
  • *
  • Posts: 45
Re: Inserting an attachment - doesn't work
« Reply #9 on: April 09, 2020, 03:32:41 AM »
The php.ini setting is to be checked (by the host provider), but I think that is not the case. As far as I know, the problem is visual but it might be also functional. Also, what is a problem, is the user menu in top left corner. It doesn't open. It just gets selected, but nothing is loading. Menu doesn't drop down. I just wonder, might these two have a common factor.

EDIT: Top menu doesn't work with FF. With Chromium and Vivaldi works fine. On mobile the menu doesn't work with Chrome. The appendix issue is the same in all browsers.
« Last Edit: April 09, 2020, 04:03:23 AM by mantu2 »

Offline mantu2

  • Semi-Newbie
  • *
  • Posts: 45
Re: Inserting an attachment - doesn't work
« Reply #10 on: April 15, 2020, 05:58:18 AM »
Php.ini checked. That is fine and I got the error note away. But still the same main problem left.

Offline mantu2

  • Semi-Newbie
  • *
  • Posts: 45
Re: Inserting an attachment - doesn't work
« Reply #11 on: April 16, 2020, 05:28:45 AM »
I continue talking to myself - apparently.

The php.ini setting is to be checked (by the host provider), but I think that is not the case. As far as I know, the problem is visual but it might be also functional. Also, what is a problem, is the user menu in top left corner. It doesn't open. It just gets selected, but nothing is loading. Menu doesn't drop down. I just wonder, might these two have a common factor.

EDIT: Top menu doesn't work with FF. With Chromium and Vivaldi works fine. On mobile the menu doesn't work with Chrome. The appendix issue is the same in all browsers.

This matter is interesting. It seems that when login in and pressing the menu, it works fine. But if I browsing to any other place in the forum and try to go back to menu, it won't work anymore. All browsers working the same way.

Offline landyvlad

  • Sr. Member
  • ****
  • Posts: 905
  • Gender: Male
    • Michael Reed on Facebook
    • GSX1400 Owners ORG
Re: Inserting an attachment - doesn't work
« Reply #12 on: April 20, 2020, 02:46:11 AM »
Have you tried the 'repair settings' process?
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.

To paraphrase Kindred: "There are no technical solutions to social problems."

No hack nor blackhats, just persistent asshats.

Offline mantu2

  • Semi-Newbie
  • *
  • Posts: 45
Re: Inserting an attachment - doesn't work
« Reply #13 on: April 20, 2020, 07:44:22 AM »
Yes, I have. All ok. Did test also various settings. No effect, what so ever.

Offline m4z

  • 98.8% chimp
  • Localizer
  • Sophist Member
  • *
  • Posts: 1,048
  • /mɛs/
Re: Inserting an attachment - doesn't work
« Reply #14 on: April 20, 2020, 01:32:51 PM »
SMF Version? PHP version? Current Firefox? Which theme are you using? Forum settings for upload size? PHP settings for upload size?

What were the "various settings" you tested? Nobody here is able to read minds. If you don't provide more information, we can't help you.
"Faith is what you have in things that don't exist."
--Homer Simpson

Offline mantu2

  • Semi-Newbie
  • *
  • Posts: 45
Re: Inserting an attachment - doesn't work
« Reply #15 on: April 21, 2020, 05:50:50 AM »
SMF 2.1 RC2
Server is using PHP:n versio 7.3.6, from Cpanel version 7.3 selected.

Theme is own made, but it is basically the same than SMF default Curve 2. Just copied theme in my forum and only mods I made are bacground, logo and message icons. Changing the theme to default do not fix the attachement sending problem.

I don't know when the problem started. Most likely around the time I did setup my web page for SSL. There where also huge amount of error messages coming on that time (like 20 K  to 35 K error log input in a day). That bug was fixed 2-3 month ago and that fix can be found from Github. Sorry of my bad memory, I don't remember the exact error code.

Because the huge amount of errors and no functional attachment input, I did install the whole forum again in order to fix both issues. It did work for the huge amount of errors but not for the attachment input. I don't remember how exact I did it, but if remembering correctly, I did find instructions how to make install with an upgrade package. So I did that. Only thing what was not reset was database.

I did work the SSL issue trough these notes: https://www.simplemachines.org/community/index.php?topic=555034.0. I cannot find anything what would be wrong.

And the attachment in other browsers:  It seems that when login in and pressing the menu, it works fine. But if I browsing to any other place in the forum and try to go back to menu, it won't work anymore. All browsers working the same way.

Attachment size: Forum 20000 kb, server (ini-file) 32 Mb.

Offline m4z

  • 98.8% chimp
  • Localizer
  • Sophist Member
  • *
  • Posts: 1,048
  • /mɛs/
Re: Inserting an attachment - doesn't work
« Reply #16 on: April 21, 2020, 11:22:51 AM »
[…]
I don't know when the problem started. Most likely around the time I did setup my web page for SSL. […]

I did work the SSL issue trough these notes: https://www.simplemachines.org/community/index.php?topic=555034.0. I cannot find anything what would be wrong.

Can you attach a (sanitized, if necessary) screenshot of what repair_settings is showing? I've seen subtle differences between the current and proposed settings that are easily overlooked. (If you had completely re-installed via SSL, this step could be skipped, but since you're still using the old DB, and repair_settings (also) fixes stuff in the DB, we should double-check.)


And the attachment in other browsers:  It seems that when login in and pressing the menu, it works fine. But if I browsing to any other place in the forum and try to go back to menu, it won't work anymore. All browsers working the same way.

What is the "menu" you're referring to here?


Attachment size: Forum 20000 kb, server (ini-file) 32 Mb.

Can you create a temporary phpinfo file and check that the php.ini setting is actually used? Also, what are the file system permissions of your attachment directory/directories?
"Faith is what you have in things that don't exist."
--Homer Simpson

Offline mantu2

  • Semi-Newbie
  • *
  • Posts: 45
Re: Inserting an attachment - doesn't work
« Reply #17 on: April 22, 2020, 04:03:17 AM »
DB, see attachement.

Menu I'm reffering to is user menu. Top left corner.

Attachement folder permeission is set to 755 and files in it 655.

I have only partially rights to use php.ini (with Cpanel). When I have done changes, they have worked fine. Here is the php.ini file info:

Configuration File (php.ini) Path            /opt/alt/php73/etc
Loaded Configuration File                    /opt/alt/php73/etc/php.ini
Scan this dir for additional .ini files     /opt/alt/php73/link/conf
Additional .ini files parsed                    /opt/alt/php73/link/conf/alt_php.ini

Offline m4z

  • 98.8% chimp
  • Localizer
  • Sophist Member
  • *
  • Posts: 1,048
  • /mɛs/
Re: Inserting an attachment - doesn't work
« Reply #18 on: April 22, 2020, 12:05:30 PM »
I have only partially rights to use php.ini (with Cpanel). When I have done changes, they have worked fine. Here is the php.ini file info: […]

Sorry, my instructions were unclear. What I meant was:
  • create a temporary file in your forum dir, f.e. "info.php", with the contents "<?php phpinfo(); ?>" (without the surrounding quotes)
  • access it with your browser; it will display a lot of info about your PHP environment
  • look for "upload_max_filesize" and "post_max_size" (they should be about the same)
  • remove the temporary file again
  • post the two values here


DB, see attachement.

From the screenshot, I assume you accessed repair_settings without the www prefix of your domain, and that's why it's suggesting different URLs? Does it make a difference to the attachment problem if you access https://yourdomain.net vs https://www.yourdomain.net?


Attachement folder permeission is set to 755 and files in it 655.

Mine is 775 for the dir and 644/755 for the files in it, but that depends very much on your webserver setup. Are the dir and files owned by the right user and group? (In my case, with nginx on Debian with the forum running as a separate user, its "myuser.www-data".)


Do attachments work, or do you see errors, when you attempt to add another attachment directory under Admin → Forum → Attachments and Avatars → Attachment Directories?
"Faith is what you have in things that don't exist."
--Homer Simpson

Offline mantu2

  • Semi-Newbie
  • *
  • Posts: 45
Re: Inserting an attachment - doesn't work
« Reply #19 on: April 23, 2020, 01:41:57 AM »
upload_max_filesize: Local value 64 mb, master value 32 mb
post_max_size: Local value 32 mb, master value 32 mb.

https://yourdomain.net vs. https://www.yourdomain.net -> Did change settings, but no effect. Tested with two browsers and in incognito window, too. Now settings are on recommended value.

I think the permissions are not the case. Those have not been changed for years and it have been working just fine (althought, if the value where changed during the re-install?)

No errors in the attachment directory tab. I can make new directories just fine. I can open attachment files, no problem with that one either.

I'm just thinking the user menu problem. What do change when pressing anything (a link, the logo...) and not pressing a thing? Because if just login and pressing the user menu, it works, but after pressing anything else and then going to click the user menu, it does not open. ... And just found out that any of the top menu drop downs doesn't drop when the problem occurs. Messages and notifications do open a page, though.

EDIT: The only error what comes time to time is: "2: preg_replace_callback(): JIT compilation failed: no more memory"

Offline mantu2

  • Semi-Newbie
  • *
  • Posts: 45
Re: Inserting an attachment - doesn't work
« Reply #20 on: April 24, 2020, 01:20:02 AM »
https://yourdomain.net vs. https://www.yourdomain.net -> Did change settings, but no effect. Tested with two browsers and in incognito window, too. Now settings are on recommended value.

I was a bit wrong about this. Afther chanching the settings to recommended values (without www), the login comes tricky. Login works wine when https://yourdomain.net is set. If putting https://www.yourdomain.net, the login window do not load all the way. It starts do load the login info, but I can see the loading circle just go around. Should this be fixed by returning the domain settings as it was or should it be fixed some other ways?

Offline m4z

  • 98.8% chimp
  • Localizer
  • Sophist Member
  • *
  • Posts: 1,048
  • /mɛs/
Re: Inserting an attachment - doesn't work
« Reply #21 on: April 24, 2020, 04:29:22 PM »
EDIT: The only error what comes time to time is: "2: preg_replace_callback(): JIT compilation failed: no more memory"

That sounds like an issue with too much memory used (but it might have other reasons), but I don't know anything about it. Maybe somebody more experienced can chime in? ;)


https://yourdomain.net vs. https://www.yourdomain.net -> Did change settings, but no effect. Tested with two browsers and in incognito window, too. Now settings are on recommended value.

I was a bit wrong about this. Afther chanching the settings to recommended values (without www), the login comes tricky. Login works wine when https://yourdomain.net is set. If putting https://www.yourdomain.net, the login window do not load all the way. It starts do load the login info, but I can see the loading circle just go around. Should this be fixed by returning the domain settings as it was or should it be fixed some other ways?

Are you changing the settings with repair_settings when you switch the domain you're accessing? You might have to logout once, then log back in (maybe even change the cookie ID), because depending on other settings like subdomain-independent cookies, your cookies might not be valid anymore after the name change.

I'm still clueless about what the reason for your problems might be.

The menu issues could be script-related. Is your JQuery set to update automatically? (Admin → Configuration → Features and Options → General)? Maybe it got corrupted somehow? Or maybe an update was released (either of JQuery or SMF) that broke things? (I'm both running a local version of JQuery and an older 2.1 version, haven't updated since October-ish.)
"Faith is what you have in things that don't exist."
--Homer Simpson

Offline mantu2

  • Semi-Newbie
  • *
  • Posts: 45
Re: Inserting an attachment - doesn't work
« Reply #22 on: April 27, 2020, 02:15:07 AM »
After chancing the URL-settings with repair_settings, I did change also the cookie. Also did log out, cleared the cache etc. No difference in actions.

JQuery has been on automatic update. Still is.

I've absolutely no idea what to do for the issues. I did think even things which should not be related to this matter. F.ex. Forum is in same directory than my Wordpress installation. it has always been so. They should not interact at all, but they still do a bit. Only case I have found out on this matter is that when changing settings with repair_settings, Wordpress firewall blocks the action. I need to white list my own action and the setting update goes forward fine.

Other thing which should not be effected is the language packs. I did test the forum also with English language pack, but the appendix problem was still there. Why did I do this? Well, although I have installed Finnish RC2, in forum server settings the Finnish language package is still marked to be RC1.

Only if there where coming messages to the error log....  :-\

Offline shawnb61

  • Developer
  • SMF Hero
  • *
  • Posts: 2,075
    • sbulen on GitHub
Re: Inserting an attachment - doesn't work
« Reply #23 on: April 27, 2020, 12:00:12 PM »
Address the process rather than the outcome.  Then, the outcome becomes more likely.   - Fripp

Offline mantu2

  • Semi-Newbie
  • *
  • Posts: 45
Re: Inserting an attachment - doesn't work
« Reply #24 on: April 29, 2020, 02:18:22 AM »
Have you tried the memory mod yet?
https://custom.simplemachines.org/mods/index.php?mod=4111

Did. It is not suported to 2.1. so I did install it manually. Just see any use of this one so far.

But main problem is that something blocks/stops JS after a click on a link on forum.

Edit: I took screenshots of main menu just after login and after clicking a link (while inspecting elements). Don't know if this helps any off you.
« Last Edit: April 29, 2020, 02:54:16 AM by mantu2 »

Offline shawnb61

  • Developer
  • SMF Hero
  • *
  • Posts: 2,075
    • sbulen on GitHub
Re: Inserting an attachment - doesn't work
« Reply #25 on: April 29, 2020, 12:56:53 PM »
Have you tried the memory mod yet?
https://custom.simplemachines.org/mods/index.php?mod=4111

Did. It is not suported to 2.1. so I did install it manually. Just see any use of this one so far.

{facepalm}  Sorry, 2.0 input on the 2.1 board...

Are you talking about issues with custom avatars or with attachments?  Or both?  Those screenshots are all about avatars, but the previous thread is all about attachments...  And it looks like those avatars are working.
Address the process rather than the outcome.  Then, the outcome becomes more likely.   - Fripp

Offline m4z

  • 98.8% chimp
  • Localizer
  • Sophist Member
  • *
  • Posts: 1,048
  • /mɛs/
Re: Inserting an attachment - doesn't work
« Reply #26 on: April 30, 2020, 04:22:13 AM »
I've absolutely no idea what to do for the issues. I did think even things which should not be related to this matter. F.ex. Forum is in same directory than my Wordpress installation. it has always been so. They should not interact at all, but they still do a bit. Only case I have found out on this matter is that when changing settings with repair_settings, Wordpress firewall blocks the action. I need to white list my own action and the setting update goes forward fine.

I know nothing about Wordpress. If it interferes with repair_settings, could it not also be the cause for your other SMF problems? Do they have to be in the same directory? Do they share files, i.e. does one maybe overwrite a file of the other?
If they do have to share the directory, can you "whitelist" SMF?


Other thing which should not be effected is the language packs. [...] Well, although I have installed Finnish RC2, in forum server settings the Finnish language package is still marked to be RC1.

Where does it show this version number? In any case, that's probably a non-issue, I guess it was just forgotten to update that string.
"Faith is what you have in things that don't exist."
--Homer Simpson

Offline mantu2

  • Semi-Newbie
  • *
  • Posts: 45
Re: Inserting an attachment - doesn't work
« Reply #27 on: May 04, 2020, 03:33:54 AM »
Shawnb61: heh. Too many board to read, ay?  ;D But sorry if the screenshots where about avatars. I tried to simulate the user menu malfunction.

m4z: Wordpress and forum folders are in the same main dir. Different databases. Most likely Wordpress wirewall is able to go trough the whole directory which includes the forum folder, too. I think that is the only thing how they co-operate.

 The language pack errors can be found when using maintenance tool to find am I having the newest versions of files (routine). Most likely a minor thing, yes.

Offline Kindred

  • The Mean One
  • Support Specialist
  • SMF Legend
  • *
  • Posts: 59,218
  • Gender: Male
    • Kindred-999 on GitHub
Re: Inserting an attachment - doesn't work
« Reply #28 on: May 04, 2020, 10:33:55 AM »
having wordpress and the forum in the same path is known to cause issues.
Wordpress assumes that it is the only script running on that path and intercepts everything.... :(
Please do not PM, IM or Email me with support questions.  You will get better and faster responses in the support boards.  Thank you.

Offline mantu2

  • Semi-Newbie
  • *
  • Posts: 45
Re: Inserting an attachment - doesn't work
« Reply #29 on: May 12, 2020, 03:02:57 AM »
having wordpress and the forum in the same path is known to cause issues.
Wordpress assumes that it is the only script running on that path and intercepts everything.... :(

Have worked fine for 11 years... until something happened.

Offline mantu2

  • Semi-Newbie
  • *
  • Posts: 45
Re: Inserting an attachment - doesn't work
« Reply #30 on: May 17, 2020, 04:17:25 AM »
Ok. There is more interface with Wordpress and smf. I got everything work, so I'm happy \o/

If somebody gets any help, I can tell that the problem was not in smf. It was most likely in Wordpress plugins and cache options. I do not know what exactly make the matter good, but I've worked mostly with W3TC page and browser cache as well with cache properties with Cloudflare. Thats about it.

Thanks for all effort. This problem was fixed with pure luck (so good luck to everybody who might face same issues).