Recent Topics

1 Jul 26, 2014 14:26    

Is there a way to edit categories for posts not going to edit posts one by one?
I am trying to import a mixed blog and then I have to sort the records to different blogs by thematics.
The problem is some of old posts are without categories, so I need to assign them one before moving them and then remove them from "uncategorized" (because not all uncategorized posts fall into the same category).

Additional problem is that the blog in question doesn't exist any more and all I have is a blogger export file. So I had to import it to blogger then import from blogger to wordpress and then b2evo in this import assigned ALL posts to whatever category was the first alphabeltically besides their own category, so now I have 540 posts where it should be removed/reassigned! I thought I could simply remove it but no, I can't since there are posts in there :(

And I will have another blog like this with a number of posts at the first years without any categories (it offers Movable Type export, I didn't try this one yet but I foresee at least the same problems there as well)

So what is the best way?

Or is the only way to split my XML file manually and import each one all the way via 3 engines? Long way...

And how about removing the first category being assigned to all without any packet categories editing? If it doesn't exist, I think it should be a feature request because it's a must have especially when migrating or making other changes to blogs structure.

2 Aug 01, 2014 00:03

Hello @wildcat,

You nailed again :D There is actually a bug in the categories assignment. The posts should not be assigned to the main category if they doesn't belong to it. Actually, all the rest of the import is well done, but the main category is assigned with ALL the posts that you are importing.

I'll share how I quickly managed to solve the issue because it's quite a simple solution, but it is still waiting to be checked by a developer, so please be careful.

1. Go to the file inc/tools/model/_wp.funcs.php
2. Go to the file 599 and replace


$post_extra_cat_IDs = array( $post_main_cat_ID );
$post_tags = array();

with


$post_extra_cat_IDs = $post_tags = array();


3. Go to the line 611 and replace


$post_main_cat_ID = $categories[ (string) $term['slug'] ];


with


$post_main_cat_ID = $post_extra_cat_IDs[] = $categories[ (string) $term['slug'] ];

Remember, make all the tests that you need, or just wait until our next GitHub update to get the issue solved without hacking your code.

Regarding the rest of your post, I'm still looking for some ideas about how to implement such a thing as that one that you're suggesting.

Thanks.

3 Aug 01, 2014 20:53

Thanks! I haven't had the time to play with my b2evo install since last week.
But do I understand the lines above correctly that tags turn into categories in this import? I mean I have this problem - tags turned into categories, it happened before WP import to b2evo but even if it didn't, this one would have done it anyway?

And this brings another question - packet tag editing! Also important.

As to how to implement this (categories), why not just do as the competitors, looks logically and not so crowded with 7-lines drop-down box alongside other fields, pretty much like in full post edit only smaller?

By the way if I move a category to another blog, what happens to the secondary ones? Would I not be able to move the category with posts in it to another blog if they have a secondary category selected in this one?

Then, in combination of this tags->categories transformation, I'd be unable to actually make any order of my 5 older blogs in one place (I wanted to import it all to my own server from various services and sort them out to different thematics).
I mean without packet category editing and packet tag editing, because manually editing every single post out there would be way too difficult.
And this is a major turn-down for someone who would otherwise want to move to your engine like I'm trying to do. Always pros and cons, no single perfect product!..

4 Aug 01, 2014 22:20

But do I understand the lines above correctly that tags turn into categories in this import? I mean I have this problem - tags turned into categories, it happened before WP import to b2evo but even if it didn't, this one would have done it anyway?

No, the structure of the XML file is imported as it. There are four different elements in the process: Users, Categories, Tags and Posts. And they are not mixed up under any circunstance.

As to how to implement this (categories), why not just do as the competitors, looks logically and not so crowded with 7-lines drop-down box alongside other fields, pretty much like in full post edit only smaller?

It would be nice to improve the Mass edit feature by adding bulk categories assignment. However, please remember that b2evo is developed by a small team, and the major efforts are still focused in performance and security matters. The UX improvements are also developed, but the highest priority is not in that area. Maybe with a stronger community of developers and contributors, several improvements might be released in shorter periods. Your suggestions are already under discussion and we would like to incorporate them to the TODO list, and also be able to release them soon. However, it is a quite long process based in the policies and limitations that I just mentioned.

By the way if I move a category to another blog, what happens to the secondary ones? Would I not be able to move the category with posts in it to another blog if they have a secondary category selected in this one?

Please, check this manual entry: http://b2evolution.net/man/user-guide/faq/move-a-category. There is a new section with the answer to your question.

As you said, your rearrangement sounds like a huge job without the right tools. Would you like to help us to help you? How do you expect that a Packet Categories/Tags should work?

5 Aug 02, 2014 17:04

@mgsolipa wrote earlier:

As you said, your rearrangement sounds like a huge job without the right tools. Would you like to help us to help you? How do you expect that a Packet Categories/Tags should work?

I totally get that smaller the popularity slower the development but it's vice versa too. It seems that the community is actually less active now than when I first found this engine :( Lack of features and addons which is due to the small community does not help. So it's a vicious circle, alas. Tipping the balance is anyway up to exisitng developers. I wish I could help with coding but I can't, alas.

So the only thing I can do is a little whining as a stimulus ;) and some structure proposal the way I see it.

Tags should be easy - same way as in post editing, it's just one line. And it could be probably copied over from the full edit mode?

Same with categories - Put the checklist the way it is now in full edit mode, say to the right, and make it smaller 7-8 lines.
So as to not make each entry too long in packet editing mode.

I did say, didn't I, that I'd expect to see those fields in packet editing mode?

This way I could take a month back and quickly edit those attributes for say 10-20 entries for a month if I need to.

As to previous entries I guess I could edit those categories/tags in WP via which I had to import them and then export again. They don't have packet editing but they have the javascript quick edit mode which is a speed-up enough.

As to broken links I'm not sure I understand, aren't the navigation links created dynamically? So only the links between entries that I made manually in the posts would be affected?


Form is loading...