Notifications
Clear all

[Solved] Old bbPress Migrated Attachments Do Not Display In Forums With Latest Update!

26 Posts
3 Users
0 Likes
2,090 Views
Posts: 89
Customer
Topic starter
(@itesla)
Member
Joined: 7 years ago

Hello, sorry for the link i have changed the permalink from (/iforums/ to /forums/) remove (i) letter from link.

At the moment i disabled Advanced Attachments plugin and images open in other window as it must be without the add-on. The last 3 updates of the addon don't display those images but just small empty squares, i will enable last version so you can investigate the code.

The bbPress attachments are in the main WP media folder, the settings of Advanced Attachments add-on is set to store images in it's own folder not WP media folder.

17 Replies
 Tom
Admin
(@tomson)
Joined: 9 years ago

Famed Member
Posts: 4168

Ok, thank you, @itesla,

Can you edit this post, then press the {;} button on editor toolbar, then take a screenshot and leave it here?

2020 07 26 10 10 17

I need to understand what is the initial HTML code of this post and what happens on displaying process.

Customer
(@itesla)
Joined: 7 years ago

Member
Posts: 89

@tomson

Yes sure, have a look.

Screenshot (1233)
 Tom
Admin
(@tomson)
Joined: 9 years ago

Famed Member
Posts: 4168

@itesla,

Ok, thank you. Please check the functions.php file of your WordPress theme and make sure there is no custom code for wpForo. if you find some let me know what code is that.

Customer
(@itesla)
Joined: 7 years ago

Member
Posts: 89

@tomson

No there is no such code, i never added there wpForo codes, i even switched themes to default ones and disabled plugins but no changes. Something with new versions of Advanced Attachments add-on.

 Tom
Admin
(@tomson)
Joined: 9 years ago

Famed Member
Posts: 4168

@itesla,

Ok, we'll update soon.

Customer
(@itesla)
Joined: 7 years ago

Member
Posts: 89

@tomson

Hello, if there is no resolution to my issue, i m gonna downgrade the plugin and addon.

 Tom
Admin
(@tomson)
Joined: 9 years ago

Famed Member
Posts: 4168

@itesla,

The problem is resolved. At the moment please put this hook code in your current active WordPress theme functions.php file. Here is the code and the instruction:

function custom_wpforo_attachment_fixing( $content ){
if( strpos($content, '../') !== FALSE ){
$forum_home = home_url();
$content = preg_replace('|https*\:\/\/[\.\/]+|i', $forum_home, $content);
}
return $content;
}
add_filter('wpforo_content_after', 'custom_wpforo_attachment_fixing', 10);

How to Easily Add Custom Code in WordPress (without Breaking Your Site)

Customer
(@itesla)
Joined: 7 years ago

Member
Posts: 89

@tomson

Hello, Tom

I have added but there was no change!

Thank you.

 Tom
Admin
(@tomson)
Joined: 9 years ago

Famed Member
Posts: 4168

@itesla,

It means you did something wrong.

1. Please leave a screenshot of the added code, I want to see where and what have you added.

2. Make sure the website cache and the wpForo cache (Dashboard > Forums > Dashboard) are deleted.

3. Let me know if you use the Advanced Attachments addon. If so, check the addon version. Make sure you use the 2.0.6 version with the current wpForo 1.8.2 version. And please, deactivate it temporarily and check  again. If you have wpForo Embeds addon, deactivate it too.

 

Customer
(@itesla)
Joined: 7 years ago

Member
Posts: 89

@tomson

Hello

Everything is updated, and i not see reason to deactivate Advanced Attachments addon cause the issue is with displaying attachments not bare forum attachments, those work without addon.
Also i tested without Embeds addon but it was same.

Here is the code i added

Screenshot (1272)

.

 Tom
Admin
(@tomson)
Joined: 9 years ago

Famed Member
Posts: 4168

@itesla,

I see reasons so please deactivate the addon. It works on the content filtering so it may affect the output.

Also I see wpforo folder in the theme, please open it with all sub-folders, I want to see what template files were copied, It seems you have some outdated forum template files so they don't contain important functions and hooks.

Customer
(@itesla)
Joined: 7 years ago

Member
Posts: 89

@tomson

But my problem is related to AA addon not without it!

Anyway i went and disabled the custom templates in child theme and the add-ons, see what you can find, as you can see without AA addon the links open in new tab.

 Tom
Admin
(@tomson)
Joined: 9 years ago

Famed Member
Posts: 4168

@itesla,

I just ask it for debugging purpose. So if it's fixed we know where to check. Nobody says you will not use the addon.

 Tom
Admin
(@tomson)
Joined: 9 years ago

Famed Member
Posts: 4168

BTW, now you can remove all custom codes, and update to 1.8.3 version. The issue should be solved if the images really exist.

But there is a chance the source URL is changed or images don't exist. I assume those image paths are incorrect and files cannot be found.

Customer
(@itesla)
Joined: 7 years ago

Member
Posts: 89

@tomson

I can't believe you said that!
Nothing works!, it works only to downgrade to old wpForo and AA addon nothing else.

Also after i added your code the next day i have faced and until today a error which i never had on my site, wondering what you did guys until i was asleep.

[moderated]

 Tom
Admin
(@tomson)
Joined: 9 years ago

Famed Member
Posts: 4168

@itesla,

Old bbPress attachments sources were changed by new version of TinyMCE (comes from WordPress core) to related paths "../../". So we're trying to help you and find ways to replace the "../../" paths to original paths. Once this is done your old bbPress images will be shown on the new wpForo and AA addon versions. The issue is a website specific issue so the solution may require some steps and patient. We're sorry that you cannot wait and stop the support.

In case you'll need this fix, just open a new topic or contact us via support[at]gvectors.com email address.

Thank you, and sorry for any inconvenience. The topic is closed.

 Tom
Admin
(@tomson)
Joined: 9 years ago

Famed Member
Posts: 4168

BTW, the 1.8.4 is released and this is also tested for your case (bbPress attachments with changed ../../ relative path). So, this version should work for your case as well. Just update it and continue to use the latest versions.

Page 2 / 2
Share:
Scroll to top