By Sabih on Friday, 07 July 2017
Posted in Technical Issues
Replies 12
Likes 0
Views 454
Votes 0
Hey there,

I tried to restore some archived stream items but I get an error message each time, no matter which item I try to restore:

1136 Column count doesn't match value count at row 1 SQL=insert into `#__social_stream` select a.* from `#__social_stream_history` as a where a.`id` IN (17528) ON DUPLICATE KEY UPDATE id = a.`id`

Domain: zaz...

PLEASE DO NOT MAKE ANY UPDATES!
Hi Sabih,

Seems like there is a bug regarding this, where by right the stream item that has been restored to social_stream table have to be state=1(published) not state=2(restored)
example of my phpmyadmin screenshot here: https://www.screencast.com/t/vE0D5Ncgo2

I've logged this issue in our issue tracker and our developers will take an action for this.
·
Wednesday, 12 July 2017 15:40
·
0 Likes
·
0 Votes
·
0 Comments
·
Hello Sabih,

Hm, can you try running this SQL query to see if it works,

ALTER TABLE `#__social_stream_history` ADD `anywhere_id` varchar(255) DEFAULT NULL;

Replace #__ with your proper table prefix.
·
Friday, 07 July 2017 22:11
·
0 Likes
·
0 Votes
·
0 Comments
·
Hi Mark,

thank you very much. There is no error message but how can I restore the items? I mean I mark the archived items , click on restore and it works so far. When I go to "restored items" they are there but how do I make them public again? There seems to be something missing.
·
Wednesday, 12 July 2017 06:27
·
0 Likes
·
0 Votes
·
0 Comments
·
Hi Muhammad,

I understand the following states:

0 = archived
1 = public
2 = restored but not public

That is fine, I just switch the state inside the database from 2 to 1 and it is working. Thank you for helping me solving this. Though it would be cool having a quick hack for this for restoring lots of items at once in the backend instead.
·
Wednesday, 12 July 2017 15:58
·
0 Likes
·
0 Votes
·
0 Comments
·
Thanks Sabih for your understanding
there is some correction where state=3 (archived)

That is fine, I just switch the state inside the database from 2 to 1 and it is working. Thank you for helping me solving this. Though it would be cool having a quick hack for this for restoring lots of items at once in the backend instead.

-> Yes, you can actually manually change the state and you've manage to do so, that great Sabih!

As a gentle reminder, kindly start a new thread if you have any other issue in the future so it will be easier for us to manage your inquiry. I will lock and mark this thread as resolved.

Have a nice day ahead
·
Wednesday, 12 July 2017 16:16
·
0 Likes
·
0 Votes
·
0 Comments
·
Hi Muhammad,

I had to comeback with a small idea how to make this work for lots of restoring items the quick way. Could you please assist me what the sql command for changing the state from 2 to 1 would be?
·
Wednesday, 12 July 2017 17:01
·
0 Likes
·
0 Votes
·
0 Comments
·
Hi Sabih,

Can you download the attached file and replace in:
.../administrator/components/com_easysocial/models/stream.php
and see how it goes?

You're suggested to backup the file that you want to replace beforehand for precaution
·
Wednesday, 12 July 2017 20:09
·
0 Likes
·
0 Votes
·
0 Comments
·
Hi Muhammad,

the file did nothing for me but I could manage to get it inside the database with this sql command:

UPDATE `#_social_stream` SET `state` = 1 WHERE `state` = 2

So it is working for me.
·
Thursday, 13 July 2017 19:37
·
0 Likes
·
0 Votes
·
0 Comments
·
Thanks for updating Sabih, glad that your issues are resolved now.
·
Thursday, 13 July 2017 23:36
·
0 Likes
·
0 Votes
·
0 Comments
·
View Full Post