Advertisement:

Author Topic: Inserting an attachment - doesn't work  (Read 2052 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,192
  • 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,192
  • 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

  • Just a monkey with a typewriter
  • Localizer
  • Sophist Member
  • *
  • Posts: 1,026
  • /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

  • Just a monkey with a typewriter
  • Localizer
  • Sophist Member
  • *
  • Posts: 1,026
  • /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

  • Just a monkey with a typewriter
  • Localizer
  • Sophist Member
  • *
  • Posts: 1,026
  • /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"