MyBB Community Forums

Full Version: Trouble with attachments after upgrade to 1.8.27
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
After upgrade to 1.8.27 the text "Click or drop some files here to upload..." is not shown in the attachment box.

[attachment=44303]

I guess the problem might be the code for the language variable.

What is the code of the language variable for "Click or drop some files here to upload..." and in which file is it located?

I found this language variable located in the file global.lang.php

$l['drop_files'] = "Click or drop some files here to upload...";

Even though this language variable is in the file, its text does not show.
(2021-08-22, 05:48 AM)Sokrates Wrote: [ -> ]After upgrade to 1.8.27 the text "Click or drop some files here to upload..." is not shown in the attachment box.

Please check your post_javascript template. Does it contain this line?:

lang.drop_files = "{$lang->drop_files}";

If not, please ensure that you have upgraded your templates (using Find Updated Templates) or otherwise ensure that that line is included in that template.
(2021-08-22, 07:29 AM)Laird Wrote: [ -> ]
(2021-08-22, 05:48 AM)Sokrates Wrote: [ -> ]After upgrade to 1.8.27 the text "Click or drop some files here to upload..." is not shown in the attachment box.

Please check your post_javascript template. Does it contain this line?:

lang.drop_files = "{$lang->drop_files}";

If not, please ensure that you have upgraded your templates (using Find Updated Templates) or otherwise ensure that that line is included in that template.

The lang.drop_files = "{$lang->drop_files}"; was already in the post_javascript template:

	<script type="text/javascript">
				lang.add_attachment = "{$lang->add_attachment}";
				lang.update_attachment = "{$lang->update_attachment}";
				lang.update_confirm = "{$lang->update_confirm}";
				lang.attachment_missing = "{$lang->attachment_missing}";
				lang.attachment_too_many_files = "{$lang->attachment_too_many_files}";
				lang.attachment_too_big_upload = "{$lang->attachment_too_big_upload}";
				lang.attachment_max_allowed_files = "{$lang->attachment_max_allowed_files}";
				lang.error_maxattachpost = "{$lang->error_maxattachpost}";
				lang.drop_files = "{$lang->drop_files}";
				lang.upload_initiate = "{$lang->upload_initiate}";
				php_max_upload_size = {$php_max_upload_size};
				php_max_file_uploads = {$php_max_file_uploads};
				mybb_max_file_uploads = {$mybb->settings['maxattachments']};
			</script>
			<script type="text/javascript" src="{$mybb->asset_url}/jscripts/post.js?ver=1827"></script>

The Find Updated Templates shows:

[attachment=44306]
(2021-08-22, 11:03 AM)Sokrates Wrote: [ -> ]The lang.drop_files = "{$lang->drop_files}"; was already in the post_javascript template

OK, that's good.

(2021-08-22, 11:03 AM)Sokrates Wrote: [ -> ]The Find Updated Templates shows

Please first update all of those templates. You should do that in any case. If the problem persists, then we can dig deeper.
(2021-08-22, 08:40 PM)Laird Wrote: [ -> ]Please first update all of those templates. You should do that in any case. If the problem persists, then we can dig deeper.

I've got a bit difficult to understand how to update templates. I've had a look at the Documentation, but can't find how to update templates.

https://docs.mybb.com/1.8/development/themes/templates/

Do you mean that I should "Revert to Original"?
(2021-08-23, 11:22 PM)Sokrates Wrote: [ -> ]Do you mean that I should "Revert to Original"?

If you don't care about keeping the customisations you or plugins you've installed have made to your templates, then, yes, you can select "Revert to Original". (You can generally afterwards simply deactivate and reactivate all of your plugins to get their template customisations reinstalled anyhow).

Otherwise, you should look at the "Diff Report" to remind yourself of the customisations you've made and then do a "Full Edit", keeping your customisations as well as the changes made between previous MyBB versions and the current one.
The interesting thing is that I've never made any customization of the templates myself.

After "Revert to Original" for all "Updated Templates", then the text in the box for the attachment became visible.

Thanks for clarifying and for pointing me in the right direction.
(2021-08-24, 12:46 AM)Sokrates Wrote: [ -> ]The interesting thing is that I've never made any customization of the templates myself.

In that case, they've almost certainly been made by plugins. As I mentioned after editing my last reply, you can in that case more than likely simply revert all templates and then deactivate and reactivate all plugins.
(2021-08-24, 12:49 AM)Laird Wrote: [ -> ]In that case, they've almost certainly been made by plugins. As I mentioned after editing my last reply, you can in that case more than likely simply revert all templates and then deactivate and reactivate all plugins.

It was good that you let me know that deactivate and reactivate all plugins, because some of the plugins were not displayed any longer. Except from the the plugin "My Tabs", the deactivation and reactivation of the plugins do not seem to have caused any problem since the expected data was shown again after the reactivation. When it comes to "My Tabs", then all its settings were lost, so I had to redo the settings again. Now it seems to work fine and the text that was missing in the attache box is still there, even after the cache of the browser has been cleaned. Now everything seems to work again Smile

Thanks for your help!
(2021-08-24, 08:14 AM)Sokrates Wrote: [ -> ]Now everything seems to work again Smile

Thanks for your help!

You're welcome!