Fixed IPB 4.2 Import - YouTube Videos

nodle

Well-known member
#1
Good Morning. Imported from IPB 4.27 this morning everything seems to have gone good (had to mess with the image proxy thing first but got it working) but none of the embedded Youtube videos are showing up. When I try to manually edit the thread, it doesn't show any code at all. It's like they were never posted. Any ideas?
 

Chris D

XenForo developer
Staff member
#3
We'd need to see what the post content was in IPS (as stored in the DB) vs how it now appears in XF.
 

nodle

Well-known member
#4
Ok here is the code in IPS:
Code:
<p>What do you think?</p>

<div class="ipsEmbeddedVideo ipsEmbeddedVideo_limited" contenteditable="false">
<div><iframe allow="autoplay; encrypted-media" allowfullscreen="true" frameborder="0" height="270" src="https://www.youtube.com/embed/0mkRgPGncn0?feature=oembed" width="480"></iframe></div>
</div>

<p>&nbsp;</p>
Xenforo thread:
Code:
What do you think?
As you can see it remains blank, it's like the converter didn't covert videos over.
 

nodle

Well-known member
#5
Also noticed that none of the old @ mentions no longer link over. Does the IPS converter no work with @ mentions for the import?
 

Chris D

XenForo developer
Staff member
#6
I shall look into the embedded video issue. To be honest, it looks like the import will need to be done again, that’s assuming there’s an issue with our message code conversion and it’s something we can provide a fix for. I’ll endeavour to get back to you shortly.

As for mentions, I’m not certain I was aware they were a thing in IPS (are they new) though I will check that too.
 

nodle

Well-known member
#7
Thanks @Chris D I don't mind having to do the import again if need be. In fact I even started from scratch deleted the xenforo folder, re-uploaded everything again, destroyed the _XF database and re-imported from scratch once again just to make sure that it wasn't the import process. But same thing the second time around. Mention in IPS have been around for quite some time now, they basically work the same way as they do here. Type @ and then it list the user, the code for those are:

Code:
<p>
    test <a contenteditable="false" data-ipshover="" data-ipshover-target="https://www.mysite.com/profile/21-c-pav/?do=hovercard" data-mentionid="21" href="https://www.mysitecom/profile/21-c-pav/" style="">@C Pav</a>
</p>
if that helps. Thanks for looking into it @Chris D .:)
 

nodle

Well-known member
#12
With regards to the embed code they're using here, it seems to be the addition of the ipsEmbeddedVideo_limited class. Any idea what this is?
I think it might be the resize feature that you can add. I did have this set custom awhile back to resize the video do you think this has something to do with it?

1.jpg
 

nodle

Well-known member
#13
I put it back to unlimited but looks like it may still be using it, here is what it looks like now:

Code:
<div class="ipsEmbeddedVideo ipsEmbeddedVideo_limited" contenteditable="false">
    <div>
        <iframe allow="autoplay; encrypted-media" allowfullscreen="true" frameborder="0" height="270" src="https://www.youtube.com/embed/5FS3Ir1Orm4?feature=oembed" width="480"></iframe>
    </div>
</div>

<p>
    &nbsp;
</p>
 

nodle

Well-known member
#14
I have been searching IPS, but unfortunately it doesn't say what ipsEmbeddedVideo_limited is used for. I did find a thread that says:
ipsEmbeddedVideo class. The layout format of the video is controled by that class.
 

Chris D

XenForo developer
Staff member
#15
I think it might be the resize feature that you can add. I did have this set custom awhile back to resize the video do you think this has something to do with it?

View attachment 170346
It does seem to be that setting having checked it on a test board I have access to. It probably doesn't work retroactively, so if you remove "Unlimited" and then post a new one, that's when that class appears.
 

nodle

Well-known member
#16
It does seem to be that setting having checked it on a test board I have access to. It probably doesn't work retroactively, so if you remove "Unlimited" and then post a new one, that's when that class appears.
So your saying that even if I uncheck it and run the re-import it won’t change the missing YouTube videos or it would fix it?
 

Chris D

XenForo developer
Staff member
#17
It won't change anything. Any embeds that were created when that setting was enabled will have the ipsEmbeddedVideo_limited class, which is what has thrown our conversion off.

I should have a solution for you though in the coming minutes...
 

Chris D

XenForo developer
Staff member
#18
When you try the import again, first replace the file in library/XenForo/Importer/IPBoard40x.php with the file attached below.

That should sort out the embeds and the mentions.
 

Attachments

nodle

Well-known member
#19
When you try the import again, first replace the file in library/XenForo/Importer/IPBoard40x.php with the file attached below.

That should sort out the embeds and the mentions.
Sorry for taking so long had to do re-import, ok so good news is it fixed the youtube problem (thank you @Chris D ), the bad new is the @ mention now work when clicking on the name, but point to random members instead.
 

Chris D

XenForo developer
Staff member
#20
I’m glad you found that actually. Presumably you didn’t retain content IDs therefore the user IDs aren’t correct.

I’ll sort that next.
 
Top