News:

Want to get involved in developing SMF? Why not lend a hand on our GitHub!

Main Menu

Updated files, can no longer add attachments to new post

Started by JazzyNL, March 04, 2025, 08:50:57 AM

Previous topic - Next topic

JazzyNL

Over the last few days we worked on addressing various outdated files on our forum, we're running 2.1.4 but had outdated files under Default Templates and Language Files. Made a backup of our /Themes folder structure and resolved the issue by installing the right language pack, copy over files from /Themes/default to the additional Themes we are using and bring over some files from the 2.1.4 Full Install zip archive.

By doing so We lost content of the 'Click or drag files here to attach them.' area while creating a post. See attachment. Unfortunately this was discovered only today so I don't know which exact file replacement caused the issue.

This behavior is not limited to a theme or language. Any idea where the issue could be?

JazzyNL

Could someone please tell me which file is responsible for the Attachments area under the text box? Then I know where to focus my investigation.

Dave J

Have a look at the 'attachments.css' file in the default theme and also 'index.css' and  'ManageAttachments.template.php' + 'Display.template.php' any changes to those might have affected it

Kindred

It really depends if the failure is happening in the editor or the template.... post.template.php -- but if you have  made edits to the sceditor itself, that might also cause the issue


(not display.template.php -- that controls the display of the POSTED content, not making a new post
Сл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."

JazzyNL

Quote from: Kindred on March 05, 2025, 10:41:40 AMIt really depends if the failure is happening in the editor or the template.... post.template.php -- but if you have  made edits to the sceditor itself, that might also cause the issue
Post.template.php is identical to the one from the fresh install package. This is what caused the problem, overwrote my outdated version with a fresh 2.1.4 file without taking a backup.

Restored my 2.1.2 version from the backup, but as expected I now have the old attachment experience. Which actually works, but not what I want. :)

Kindred

SO, yeah....   you have some modified files --   and you can't just replace ONE file.

Suggest you do the following

remove all mods - use repair_settings.php to remove hooks
remove custom themes and delete files
replace all files with 2.1.4 form the large upgrade package
re-apply themes
re-apply mods
Сл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."


JazzyNL

Quote from: Kindred on March 05, 2025, 02:20:22 PMSO, yeah....   you have some modified files --   and you can't just replace ONE file.

Suggest you do the following

remove all mods - use repair_settings.php to remove hooks
remove custom themes and delete files
replace all files with 2.1.4 form the large upgrade package
re-apply themes
re-apply mods
Yeah, I was afraid it would come to that. ;( Need to work with the other admins to understand how some of the mods were used and what files have been edited, but I understand why this is the best course of action to get rid of some of the mess we had.

Advertisement: