s9e Media BBCodes pack

s9e Media BBCodes pack 20231102

No permission to download
@JoshyPHP

Just updated to latest and got this in error log:

Code:
Server Error Log
Error Info
ErrorException: Undefined variable: versionId - library/s9e/MediaBBCodes.php:274
Generated By: andrewkm, 16 minutes ago
Stack Trace
#0 /home/ecocitycraft/public_html/forum/library/s9e/MediaBBCodes.php(274): XenForo_Application::handlePhpError(8, 'Undefined varia...', '/home/ecocitycr...', 274, Array)
#1 /home/ecocitycraft/public_html/forum/library/s9e/MediaBBCodes.php(252): s9e_MediaBBCodes::upgradeTags()
#2 /home/ecocitycraft/public_html/forum/library/s9e/MediaBBCodes.php(206): s9e_MediaBBCodes::upgrade(201504220)
#3 [internal function]: s9e_MediaBBCodes::install(Array, Array, Object(SimpleXMLElement))
#4 /home/ecocitycraft/public_html/forum/library/XenForo/Model/AddOn.php(215): call_user_func(Array, Array, Array, Object(SimpleXMLElement))
#5 /home/ecocitycraft/public_html/forum/library/ConvEss/Model/AddOn.php(24): XenForo_Model_AddOn->installAddOnXml(Object(SimpleXMLElement), 's9e')
#6 /home/ecocitycraft/public_html/forum/library/XenForo/Model/AddOn.php(169): ConvEss_Model_AddOn->installAddOnXml(Object(SimpleXMLElement), 's9e')
#7 /home/ecocitycraft/public_html/forum/library/XenForo/ControllerAdmin/AddOn.php(236): XenForo_Model_AddOn->installAddOnXmlFromFile('/home/ecocitycr...', 's9e')
#8 /home/ecocitycraft/public_html/forum/library/XenForo/FrontController.php(347): XenForo_ControllerAdmin_AddOn->actionUpgrade()
#9 /home/ecocitycraft/public_html/forum/library/XenForo/FrontController.php(134): XenForo_FrontController->dispatch(Object(XenForo_RouteMatch))
#10 /home/ecocitycraft/public_html/forum/admin.php(13): XenForo_FrontController->run()
#11 {main}
Request State
array(3) {
["url"] => string(63) "http://www.ecocitycraft.com/forum/admin.php?add-ons/s9e/upgrade"
["_GET"] => array(1) {
["add-ons/s9e/upgrade"] => string(0) ""
}
["_POST"] => array(3) {
["server_file"] => string(0) ""
["_xfConfirm"] => string(1) "1"
["_xfToken"] => string(8) "********"
}
}
 
Hello, I can't upgrade to the latest version..

Server Error
Undefined variable: versionId

  1. XenForo_Application::handlePhpError() in s9e/MediaBBCodes.php at line 274
  2. s9e_MediaBBCodes::upgradeTags() in s9e/MediaBBCodes.php at line 252
  3. s9e_MediaBBCodes::upgrade() in s9e/MediaBBCodes.php at line 206
  4. s9e_MediaBBCodes::install()
  5. call_user_func() in XenForo/Model/AddOn.php at line 215
  6. XenForo_Model_AddOn->installAddOnXml() in XenForo/Model/AddOn.php at line 169
  7. XenForo_Model_AddOn->installAddOnXmlFromFile() in XenForo/ControllerAdmin/AddOn.php at line 236
  8. XenForo_ControllerAdmin_AddOn->actionUpgrade() in XenForo/FrontController.php at line 347
  9. XenForo_FrontController->dispatch() in XenForo/FrontController.php at line 134
  10. XenForo_FrontController->run() in /home/x/public_html/admin.php at line 13
 
@JoshyPHP, your upgradeTags function needs to have the $versionId sent into it.

It should be:
Code:
	protected static function upgrade($versionId)
	{
		self::upgradeTags($versionId);
	}

	/**
	* Upgrade the list of enabled tags
	*
	* Automatically enables new tags
	*
	* @return void
	*/
	protected static function upgradeTags($versionId)
	{
 
@andrewkm @estranged @Xon Thanks for the heads up and sorry for any inconvenience. I tested the previous update by upgrading from an old version but I forgot to also test it when upgrading from a recent version. :X3:

Usually I write an automated test for each change but I didn't have time for this one and I thought that such a small change shouldn't cause any problem. That's Murphy's Law in action.
 
  • Like
Reactions: Xon
@Code Monkey That URL is not currently supported. I'll add support for that kind of URLs in the next update. In the meantime you can use the URL for the video's page:
Code:
https://vimeo.com/125956083


@Jeff Fuqua I don't know. If you're not satisfied with the version you use then yes. Otherwise, you can wait to upgrade the add-on until you upgrade XenForo to 1.4. Older versions of the add-ons are available there: https://xenforo.com/community/resources/s9e-media-bbcodes-pack.2476/history - You can't downgrade an add-on but you can always uninstall it then reinstall it.
 
Hi JoshyPHP,
A while back you and I discussed having the program adapting for tapatalk, etc. You did not want to get into this subject as a feature. I have been unable to get that to happen looking through your PHP:

Your youtube function is here:
Code:
public static function renderYoutube($vars)
    {
        $vars += array('h' => null, 'id' => null, 'list' => null, 'm' => null, 's' => null, 't' => null);

        $html='<iframe width="560" height="315" allowfullscreen="" frameborder="0" scrolling="no" data-s9e="" src="//www.youtube.com/embed/'.htmlspecialchars($vars['id'],2);if(isset($vars['list']))$html.='?list='.htmlspecialchars($vars['list'],2);if(isset($vars['t'])||isset($vars['m'])){if(isset($vars['list']))$html.='&amp;';else$html.='?';$html.='start=';if(isset($vars['t']))$html.=htmlspecialchars($vars['t'],2);elseif(isset($vars['h']))$html.=htmlspecialchars($vars['h']*3600+$vars['m']*60+$vars['s'],2);else$html.=htmlspecialchars($vars['m']*60+$vars['s'],2);}$html.='"></iframe>';

        return $html;

and it appears that $url is the original site URL.
Could you advise how I could simply output the embed like now but follow with a line break and the original URL. I could then make the manual adjustment for my own script since you do not feel this is a good feature for all at this time. Thank you for considering.
 
What would suddenly cause these errors? I've not changed anything for months and now getting a lot of these:

ErrorException: Fatal Error: Out of memory (allocated 18087936) (tried to allocate 2878271529 bytes) - library/s9e/MediaBBCodes.php:230

ErrorException: preg_replace_callback(): Requires argument 2, '', to be a valid callback - library/s9e/MediaBBCodes.php:217
 
A while back you and I discussed having the program adapting for tapatalk, etc. You did not want to get into this subject as a feature.
I exchanged a couple of emails with one of their guys and we came to the conclusion that it wasn't feasible. Tapatalk is a native application that can't embed web content the way XenForo does. They have some support for YouTube videos but each media provider requires a lot of manual work to add, when it's even possible.

Could you advise how I could simply output the embed like now but follow with a line break and the original URL.
The simplest way in XenForo would be to enable the "Auto-embed media, and add a link to the content within this BB code" option. Search for autoEmbedMedia in the top right of your Admin CP. Once a video is embedded, XenForo discards the original URL. That option adds a link to the original URL but it only applies when a URL is automatically embedded. It doesn't work with the "Media" button in the editor.

What would suddenly cause these errors? I've not changed anything for months and now getting a lot of these:
Possibly a PHP update or a PCRE update by your webhost. That error message does not make sense, nothing should ever try to allocate 2.68 GB of memory in one go. What version of PHP does your forum run on?
 
Possibly a PHP update or a PCRE update by your webhost. That error message does not make sense, nothing should ever try to allocate 2.68 GB of memory in one go. What version of PHP does your forum run on?
This is the only error code I'm getting now:
ErrorException: preg_replace_callback(): Requires argument 2, '', to be a valid callback - library/s9e/MediaBBCodes.php:217

Get it every couple of minutes.

We're PHP 5.4.40. Thanks.
 
PHP 5.4.40 was released on the 16th of April. That's what changed in your setup. Your web host must have recently upgraded.

I can't make sense of any of the error messages you posted. One of them mentions allocating more than 2 GB of memory, which is not possible. The other mentions an invalid callback '' but that cannot happen either because the callback isn't a string, it's a closure and the error message should be different if there was a problem with it. That could be a bug in the PHP I guess. You may want to send an email to your web host, see what they think.

Here's what I would in your situation, in order:
  1. See if my host supports PHP 5.5 or 5.6 and switch to it. Some hosts offer multiple versions of PHP at once.
  2. Try other versions of the add-on. Until you upgrade to XenForo 1.4, the most recent version would be 20141126b.
  3. Disable the add-on until your PHP situation is fixed.
 
Realistically, I don't expect another version to work better than the one you're running. It's a shot in the dark.
 
Top Bottom