To participate you must create an account on apostrophenow.org. If you have already done so, click Login.

Ticket #1214 (closed defect: fixed)

Opened 4 months ago

Last modified 3 months ago

aBlogEvents:migrate brokes the virtual pages engine

Reported by: k4llu Owned by: dordille
Priority: major Milestone:
Component: apostropheBlogPlugin Version:
Keywords: Cc:
Symfony version: 1.4

Description

When you create a blog post, it's virtual page has the engine 'aBlogPost' (this should happen for event post too). when you migrate your apostrophe project, the engine is changed from aBlogPost to aBlog.

The aBlogEvents:migrate static method runs the following statements

$migrate->query('UPDATE a_page SET engine = "aBlog" WHERE slug LIKE "@a_blog_search_redirect%"');
$migrate->query('UPDATE a_page SET engine = "aEvent" WHERE slug LIKE "@a_event_search_redirect%"');

The statements should be:

$migrate->query('UPDATE a_page SET engine = "aBlogPost" WHERE slug LIKE "@a_blog_search_redirect%"');
$migrate->query('UPDATE a_page SET engine = "aEventPost" WHERE slug LIKE "@a_event_search_redirect%"');

Assuming that the creation of a event is changed to create aEventPost object instead of aEvent. You can not differentiate between a apostrophe engine page that lists events and a virtual event page, using the engine field as you can for a blog post and blog listing.

Change History

Changed 3 months ago by tboutell

  • status changed from new to closed
  • resolution set to fixed

Fixed in [4590] thanks for catching it.

We will not be changing the engine setting for a virtual event page though. You can make that distinction by checking the slug and that is how we do it, so I'm not going to introduce a potential bc problem unnecessarily, although I agree it probably would have been better to start out the way you suggest.

Changed 3 months ago by tboutell

(Also the engine name has to match the model name, which wouldn't be true if I switched it to aEventPost. Without this rule the search helper class for that model is not located successfully.)

Changed 3 months ago by k4llu

Oky. Thanks for the fix. I just want to mention that if you keep the engine as aEvent for virtual event pages then you can not add links to other events on that event page.

Meaning, if you have an event and you want to add a related events slot or upcoming events on that page, then the URLs for those events on that page will be broken.

Note: See TracTickets for help on using tickets.