By Leon Hart on Thursday, 09 June 2016
Posted in General
Replies 5
Likes 0
Views 756
Votes 0
I get a fatal error when updating posts

To report

1. SELECT ALL POSTS
2. PUBLISH ALL POSTS

Is there any reason why this is happening?

Warning: Invalid argument supplied for foreach() in /home/xdn8whx4/public_html/administrator/components/com_easyblog/includes/post/post.php on line 1652

Warning: Creating default object from empty value in /home/xdn8whx4/public_html/administrator/components/com_finder/helpers/indexer/adapter.php on line 557

Catchable fatal error: Argument 1 passed to plgFinderEasyBlog::index() must be an instance of FinderIndexerResult, instance of stdClass given, called in /home/xdn8whx4/public_html/administrator/components/com_finder/helpers/indexer/adapter.php on line 330 and defined in /home/xdn8whx4/public_html/plugins/finder/easyblog/easyblog.php on line 157
Hey Leon,

I believe the reason why you hitting this is mostly when you doing the migration that time, is not migrated properly then causing this issue.

Can you check again is it still hitting these error?
·
Thursday, 09 June 2016 22:27
·
0 Likes
·
0 Votes
·
0 Comments
·
Hi Arlex

Thanks for getting bacl to me so quickly

Yes the error has gone to get rid of it I had ro resave all of the data again. I have a couple of questions related to the data migration however

1. Can you help me understand the database relationship. For example I have uploaded viaphpmyyadmin the correct dates that all of the migrated blogs were created however if I check in the back end and front end I can still see a date thats not correct

2. If I make a change in the database to any field then it seems not to reflect in the front end the only way to get a changed to actually propegate is to do the work from the backend and save the data. I am migrating all of my blogs and doing it this way means it will take me ages.

Regards
·
Thursday, 09 June 2016 22:52
·
0 Likes
·
0 Votes
·
0 Comments
·
hey Leon,

I am sorry for the delay of this reply,

1. Can you help me understand the database relationship. For example I have uploaded viaphpmyyadmin the correct dates that all of the migrated blogs were created however if I check in the back end and front end I can still see a date thats not correct

I've checked on your screenshot which you provided at above, it seems like you highlighted that post is not correct the ID and the post title. perhaps you can check my screenshot below it seems show correctly the date from that post.

2. If I make a change in the database to any field then it seems not to reflect in the front end the only way to get a changed to actually propegate is to do the work from the backend and save the data. I am migrating all of my blogs and doing it this way means it will take me ages.

Actually I am not recommended you update the value from backend it because you only updated on 1 table, we actually have another table responsible to store this as well -> #__easyblog_revision

In other word, when you update your publish date from #_easyblog_post table, you have to update all the `revision_id` to 0 from this table #_easyblog_post , then truncate all the data in this table `#__easyblog_revisions`.

After you truncated, you have to load your blog listing page from backend > Easyblog > blog , so that system will regenerate all the correct revision id and all the data in `#__easyblog_revisions` table.

I also believe the reason why you hitting above error message is because you manually update the value through your database so messed up the `#__easyblog_revisions` table inside the data, so system can't able to process correctly.
·
Friday, 10 June 2016 16:53
·
0 Likes
·
0 Votes
·
0 Comments
·
Thanks Arlex

Ok so if I am importing data like created date I need to do the following

1. UPDATE `polarhome_easyblog_post` SET `revision_id` = 0
2. DELETE FROM `polarhome_easyblog_revisions` WHERE 1

How do I then get the revisions table to reppulate? Can I just select all and publish will that do it?

Thanks
·
Friday, 10 June 2016 22:25
·
0 Likes
·
0 Votes
·
0 Comments
·
You're welcome Leon.

You can try follow my instruction below to achieve this :

1. Run this query to update all of your post `revision_id` to 0
UPDATE `polarhome_easyblog_post` SET `revision_id` = 0;


2. Truncate all the data from this table :
TRUNCATE TABLE `polarhome_easyblog_revisions`;


3. After you done above step, you no need publish or unpublish your post, you go to your backend > Easyblog > blog listing page then okay d, when you load the post on the page, the system will help you automatically update all the revision id into your both table.
·
Friday, 10 June 2016 23:49
·
0 Likes
·
0 Votes
·
0 Comments
·
View Full Post