• This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn more.

change from [BLOB - 12B] to [BLOB - 64B]

netkingZ

Active member
#1
Hello , i need change the recipients of xf_conversation_master from [BLOB - 12B] to [BLOB - 64B], how can I do?

I tried to pass the data through DataWriter and ControllerPublic but the data does not change, however I need that through the ControllerPublic and DataWriter the data is changed from the current [BLOB - 12B] to [BLOB - 64B].

In Add-on that I'm creating I need to send a conversation but being the recipients of xf_conversation_master set to [BLOB - 12B] is generated so an error in the JS console but if you were able to set the recipients to [BLOB - 64B] as for normal conversations that you make with xenForo I might have solved the problem.

Thanks you
 
Last edited:

Jeremy

Well-known member
#2
Use an ALTER statement and then make sure that the data writer is updated to include the new declaration.
 

netkingZ

Active member
#3
How is the correct wording to make the change?
I've never used ALTER.

I do not want to change it to another type, such as BLOB 12B to VARCHAR , I want you to change from [BLOB - 12B] to [BLOB - 64B]
 

netkingZ

Active member
#4
I tried entering:

ALTER TABLE xf_conversation_master MODIFY recipients MEDIUMBLOB
and

ALTER TABLE xf_conversation_master MODIFY recipients BINARY(64)
the error that continues to pose is this:

The following error occurred
The server responded with an error. The error message is in the JavaScript console.
Template Errors: conversation_list
  1. Invalid argument supplied for foreach() in /Applications/MAMP/htdocs/xf14/library/XenForo/Template/Abstract.php(265) : eval()'d code, line 139:
    138: ';
    139: foreach ($conversation['recipientNames'] AS $recipient)
    140: {

  2. Invalid argument supplied for foreach() in /Applications/MAMP/htdocs/xf14/library/XenForo/Template/Abstract.php(265) : eval()'d code, line 139:
    138: ';
    139: foreach ($conversation['recipientNames'] AS $recipient)
    140: {

  3. Invalid argument supplied for foreach() in /Applications/MAMP/htdocs/xf14/library/XenForo/Template/Abstract.php(265) : eval()'d code, line 139:
    138: ';
    139: foreach ($conversation['recipientNames'] AS $recipient)
    140: {

  4. Invalid argument supplied for foreach() in /Applications/MAMP/htdocs/xf14/library/XenForo/Template/Abstract.php(265) : eval()'d code, line 139:
    138: ';
    139: foreach ($conversation['recipientNames'] AS $recipient)
    140: {

the console error is this:

PHP <div class="baseHtml"><h4>Template Errors: conversation_list_popup</h4><ol> <li><i>Invalid argument supplied for foreach()</i> in /Applications/MAMP/htdocs/xf14/library/XenForo/Template/Abstract.php(265) : eval()'d code, line 39: <pre>38: ))); 39: foreach ($conversation['recipientNames'] AS $recipient) 40: { </pre></li> <li><i>Invalid argument supplied for foreach()</i> in /Applications/MAMP/htdocs/xf14/library/XenForo/Template/Abstract.php(265) : eval()'d code, line 39: <pre>38: ))); 39: foreach ($conversation['recipientNames'] AS $recipient) 40: { </pre></li> <li><i>Invalid argument supplied for foreach()</i> in /Applications/MAMP/htdocs/xf14/library/XenForo/Template/Abstract.php(265) : eval()'d code, line 39: <pre>38: ))); 39: foreach ($conversation['recipientNames'] AS $recipient) 40: { </pre></li> <li><i>Invalid argument supplied for foreach()</i> in /Applications/MAMP/htdocs/xf14/library/XenForo/Template/Abstract.php(265) : eval()'d code, line 93: <pre>92: ))); 93: foreach ($conversation['recipientNames'] AS $recipient) 94: { </pre></li> </ol></div> {"templateHtml":"\n\n\n\n\n\t<div>\n\t\t\n\t\t\t\n\t\t\t\t<ol class=\"Unread secondaryContent\" data-defaultBackground=\"#f0f7fc\">\n\t\t\t\t\t<li class=\"listItem unread PopupItemLink\">\n\n\t<a href=\"index.php?members\/netkingz.1\/\" class=\"avatar Av1s plainImage\" data-avatarhtml=\"true\"><img src=\"data\/avatars\/s\/0\/1.jpg?1381014173\" width=\"48\" height=\"48\" alt=\"netkingZ\" \/><\/a>\n\t\n\t<div class=\"listItemText\">\n\t\t<h3 class=\"title\"><a href=\"index.php?conversations\/clanwar-2013-10-07-23-45-00-nkzteam-vs-rootclan.3\/unread\" class=\"PopupItemLink\">[Clanwar] 2013-10-07 23:45:00 - nkzTeam vs rootClan<\/a><\/h3>\n\n\t\t<div class=\"posterDate muted\">\n\t\t\tWith: <a href=\"index.php?members\/netkingz.1\/\" class=\"username\" title=\"Conversation Starter\">netkingZ<\/a>\n\t\t<\/div>\n\t\t\n\t\t<div class=\"muted\" title=\"Last reply by netkingZ\">\n\t\t\tLast message by <a href=\"index.php?members\/netkingz.1\/\" class=\"username\">netkingZ<\/a>,\n\t\t\t<abbr class=\"DateTime\" data-time=\"1381122081\" data-diff=\"1021\" data-datestring=\"Oct 7, 2013\" data-timestring=\"6:01 AM\">Oct 7, 2013 at 6:01 AM<\/abbr>\n\t\t<\/div>\n\t<\/div>\n\t\n<\/li><li class=\"listItem unread PopupItemLink\">\n\n\t<a href=\"index.php?members\/netkingz.1\/\" class=\"avatar Av1s plainImage\" data-avatarhtml=\"true\"><img src=\"data\/avatars\/s\/0\/1.jpg?1381014173\" width=\"48\" height=\"48\" alt=\"netkingZ\" \/><\/a>\n\t\n\t<div class=\"listItemText\">\n\t\t<h3 class=\"title\"><a href=\"index.php?conversations\/clanwar-2013-10-07-20-20-00-nkzteam-vs-rootclan.2\/unread\" class=\"PopupItemLink\">[Clanwar] 2013-10-07 20:20:00 - nkzTeam vs rootClan<\/a><\/h3>\n\n\t\t<div class=\"posterDate muted\">\n\t\t\tWith: <a href=\"index.php?members\/netkingz.1\/\" class=\"username\" title=\"Conversation Starter\">netkingZ<\/a>\n\t\t<\/div>\n\t\t\n\t\t<div class=\"muted\" title=\"Last reply by netkingZ\">\n\t\t\tLast message by <a href=\"index.php?members\/netkingz.1\/\" class=\"username\">netkingZ<\/a>,\n\t\t\t<abbr class=\"DateTime\" data-time=\"1381121260\" data-diff=\"1842\" data-datestring=\"Oct 7, 2013\" data-timestring=\"5:47 AM\">Oct 7, 2013 at 5:47 AM<\/abbr>\n\t\t<\/div>\n\t<\/div>\n\t\n<\/li><li class=\"listItem unread PopupItemLink\">\n\n\t<a href=\"index.php?members\/netkingz.1\/\" class=\"avatar Av1s plainImage\" data-avatarhtml=\"true\"><img src=\"data\/avatars\/s\/0\/1.jpg?1381014173\" width=\"48\" height=\"48\" alt=\"netkingZ\" \/><\/a>\n\t\n\t<div class=\"listItemText\">\n\t\t<h3 class=\"title\"><a href=\"index.php?conversations\/clanwar-2013-10-07-19-40-00-nkzteam-vs-rootclan.1\/unread\" class=\"PopupItemLink\">[Clanwar] 2013-10-07 19:40:00 - nkzTeam vs rootClan<\/a><\/h3>\n\n\t\t<div class=\"posterDate muted\">\n\t\t\tWith: <a href=\"index.php?members\/netkingz.1\/\" class=\"username\" title=\"Conversation Starter\">netkingZ<\/a>\n\t\t<\/div>\n\t\t\n\t\t<div class=\"muted\" title=\"Last reply by netkingZ\">\n\t\t\tLast message by <a href=\"index.php?members\/netkingz.1\/\" class=\"username\">netkingZ<\/a>,\n\t\t\t<abbr class=\"DateTime\" data-time=\"1381107045\" data-diff=\"16057\" data-datestring=\"Oct 7, 2013\" data-timestring=\"1:50 AM\">Oct 7, 2013 at 1:50 AM<\/abbr>\n\t\t<\/div>\n\t<\/div>\n\t\n<\/li>\n\t\t\t\t<\/ol>\n\t\t\t\n\t\t\t\n\t\t\t\t<ol class=\"secondaryContent\">\n\t\t\t\t\t<li class=\"listItem PopupItemLink\">\n\n\t<a href=\"index.php?members\/netkingz.1\/\" class=\"avatar Av1s plainImage\" data-avatarhtml=\"true\"><img src=\"data\/avatars\/s\/0\/1.jpg?1381014173\" width=\"48\" height=\"48\" alt=\"netkingZ\" \/><\/a>\n\t\n\t<div class=\"listItemText\">\n\t\t<h3 class=\"title\"><a href=\"index.php?conversations\/clanwar-2013-10-07-14-40-00-nkzteam-vs-rootclan.4\/\" class=\"PopupItemLink\">[Clanwar] 2013-10-07 14:40:00 - nkzTeam vs rootClan<\/a><\/h3>\n\n\t\t<div class=\"posterDate muted\">\n\t\t\tWith: <a href=\"index.php?members\/netkingz.1\/\" class=\"username\" title=\"Conversation Starter\">netkingZ<\/a>\n\t\t<\/div>\n\t\t\n\t\t<div class=\"muted\" title=\"Last reply by netkingZ\">\n\t\t\tLast message by <a href=\"index.php?members\/netkingz.1\/\" class=\"username\">netkingZ<\/a>,\n\t\t\t<abbr class=\"DateTime\" data-time=\"1381122475\" data-diff=\"627\" data-datestring=\"Oct 7, 2013\" data-timestring=\"6:07 AM\">Oct 7, 2013 at 6:07 AM<\/abbr>\n\t\t<\/div>\n\t<\/div>\n\t\n<\/li>\n\t\t\t\t<\/ol>\n\t\t\t\n\t\t\n\t<\/div>\n","css":"","js":"","title":"Conversations","navigation":[["http:\/\/localhost:8888\/xf14\/index.php?account\/","Your Account"]],"_visitor_conversationsUnread":"3","_visitor_alertsUnread":"0"}
The data are entered into the database and pass the only voice that does not come back is precisely that of recipients that is set with [BLOB - 12B].
So I guess the error in the Js and that I posted above prorpio resulting from that.
 

Lawrence

Well-known member
#7
Hello , i need change the recipients of xf_conversation_master from [BLOB - 12B] to [BLOB - 64B], how can I do?
You can't. that 12B is the amount of data (in Bytes) that is currently contained in that blob. It changes automatically as there is more or less data stored in it. I'm not sure what you are trying to do, why 64B is important to you. Try increasing the number of conversation recipients setting in the registered user group permissions page, maybe? Remember BLOBS need serialized data, so the data needs to be unserialized for the foreach to work.
 

netkingZ

Active member
#8
and the error that comes out not you tell me anything?

Template Errors: conversation_list
  1. Invalid argument supplied for foreach() in /Applications/MAMP/htdocs/xf14/library/XenForo/Template/Abstract.php(265) : eval()'d code, line 139:
    138: ';
    139: foreach ($conversation['recipientNames'] AS $recipient)
    140: {
  2. Invalid argument supplied for foreach() in /Applications/MAMP/htdocs/xf14/library/XenForo/Template/Abstract.php(265) : eval()'d code, line 139:
    138: ';
    139: foreach ($conversation['recipientNames'] AS $recipient)
    140: {
  3. Invalid argument supplied for foreach() in /Applications/MAMP/htdocs/xf14/library/XenForo/Template/Abstract.php(265) : eval()'d code, line 139:
    138: ';
    139: foreach ($conversation['recipientNames'] AS $recipient)
    140: {
  4. Invalid argument supplied for foreach() in /Applications/MAMP/htdocs/xf14/library/XenForo/Template/Abstract.php(265) : eval()'d code, line 139:
    138: ';
    139: foreach ($conversation['recipientNames'] AS $recipient)
    140: {
May depend on the amount of bytes or not?

EDIT:

I reached 64bytes but the error persists because the data is serialized, how can I solve?
What I'm trying to do is to send a conversation outside of the usual conversation system xenForo and directly upload the data to the database.

how can I unserialized?
 
Last edited: