News:

Want to get involved in developing SMF, then why not lend a hand on our github!

Main Menu

Inserting an attachment - doesn't work

Started by mantu2, March 31, 2020, 01:41:14 AM

Previous topic - Next topic

mantu2

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.

Kindred

Слaва
Украинi

Please do not PM, IM or Email me with support questions.  You will get better and faster responses in the support boards.  Thank you.

"Loki is not evil, although he is certainly not a force for good. Loki is... complicated."

mantu2


mantu2

I found out that this is somehow theme related issue. Can anybody help where to start fixing?

Kindred

well, you're not giving much information for us to help you...
Слaва
Украинi

Please do not PM, IM or Email me with support questions.  You will get better and faster responses in the support boards.  Thank you.

"Loki is not evil, although he is certainly not a force for good. Loki is... complicated."

mantu2

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.

Bobby

1) Is your browser enable/disable javascript?
2) Did you config your attachments folder correctly? Plz check it on ACP —> Forum —> Attachment settings

mantu2

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.

Bobby

Quote from: mantu2 on April 05, 2020, 07:23:18 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!

mantu2

#9
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.

mantu2

Php.ini checked. That is fine and I got the error note away. But still the same main problem left.

mantu2

I continue talking to myself - apparently.

Quote from: mantu2 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.

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.

landyvlad

Have you tried the 'repair settings' process?
"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.

mantu2

Yes, I have. All ok. Did test also various settings. No effect, what so ever.

m4z

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

Es gibt hier im Forum ein deutsches Support-Board!

mantu2

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.

m4z

Quote from: mantu2 on April 21, 2020, 05:50:50 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.)


Quote from: mantu2 on April 21, 2020, 05:50:50 AM
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?


Quote from: mantu2 on April 21, 2020, 05:50:50 AM
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

Es gibt hier im Forum ein deutsches Support-Board!

mantu2

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

m4z

Quote from: mantu2 on April 22, 2020, 04:03:17 AM
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


Quote from: mantu2 on April 22, 2020, 04:03:17 AM
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?


Quote from: mantu2 on April 22, 2020, 04:03:17 AM
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

Es gibt hier im Forum ein deutsches Support-Board!

mantu2

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"

mantu2

Quote from: mantu2 on April 23, 2020, 01:41:57 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?

m4z

Quote from: mantu2 on April 23, 2020, 01:41:57 AM
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? ;)


Quote from: mantu2 on April 24, 2020, 01:20:02 AM
Quote from: mantu2 on April 23, 2020, 01:41:57 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?

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

Es gibt hier im Forum ein deutsches Support-Board!

mantu2

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....  :-\

shawnb61

Address the process rather than the outcome.  Then, the outcome becomes more likely.   - Fripp

mantu2

#24
Quote from: shawnb61 on April 27, 2020, 12:00:12 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.

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.

shawnb61

Quote from: mantu2 on April 29, 2020, 02:18:22 AM
Quote from: shawnb61 on April 27, 2020, 12:00:12 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

m4z

Quote from: mantu2 on April 27, 2020, 02:15:07 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?


Quote from: mantu2 on April 27, 2020, 02:15:07 AM
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

Es gibt hier im Forum ein deutsches Support-Board!

mantu2

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.

Kindred

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.... :(
Слaва
Украинi

Please do not PM, IM or Email me with support questions.  You will get better and faster responses in the support boards.  Thank you.

"Loki is not evil, although he is certainly not a force for good. Loki is... complicated."

mantu2

Quote from: Kindred 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.... :(

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

mantu2

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).

kkmixs

My forum is facing the same problem. I can open popup to select file but post that nothing happen when click on upload or add button. Please help.

Advertisement: