eZ Community » Forums » eZ Publish 5 Platform » Template matches overridden by ezdemo...
expandshrink

Template matches overridden by ezdemo after upgrade from 2014.07 -> 2014.11

Template matches overridden by ezdemo after upgrade from 2014.07 -> 2014.11

Tuesday 25 November 2014 4:42:50 am - 6 replies

I recently upgraded to 2014.11, and it seems eZDemo is now overriding some of my templates.  For example:

In my main ezpublish.yml I have the following matches for landing_page content type:

 

                mysection_landing_page:                  template: "MyWebBundle:dealer:landing_page.html.twig"
 
                  match:                    Identifier\ContentType: [ "landing_page"]
 
                    Identifier\Section: mysection
 
               landing_page:                  template: "MyWebBundle:full:landing_page.html.twig"
 
                  match:                    Identifier\ContentType: ["landing_page"] 
 
Neither matches my landing pages after the upgrade; instead the eZDemo landing page default matches.  I was able to get the  simple landing page to match by renaming it to 'frontpage', which is the same name used as eZDemo, but I can't get the section match to work without commenting out the eZDemo match entirely in the ezdemo vendor bundle.
 
Am I doing something wrong?  These worked just fine before the upgrade.

Modified on Tuesday 25 November 2014 4:45:38 am by Jackson Murtha

Wednesday 26 November 2014 11:37:49 am

Hi

In DemoBundle, we now use default keyword instead of specifying a SiteAccess name. Any reason why you're using DemoBundle for your website? Best would be to deactivate it.

Wednesday 26 November 2014 11:49:49 am

mmm, if best option is deactivating it, shouldn't be better if it was not enabled in our eZPublishKernel.php by default? 

https://github.com/ezsystems/ezpublish-community/blob/master/ezpublish/EzPublishKernel.php#L70

Edit: Maybe we could go for a symfony like solution where the installer ask you if you want to install Acme/Demo or not... 

Edit2: And please also note that if you do that you will need to change some more things. 

At least you will need to twig your config.yml file and also your routing.yml one...

this a bit problematic when you want to sync your files with the ezsystem repo one and i guess could give some problems on updating from version to version, as those files are distributed within the source... 

Modified on Wednesday 26 November 2014 12:06:46 pm by Carlos Revillo

Friday 28 November 2014 4:09:38 pm

Yes, I did leave eZDemo enabled, treating it (as I do with the legacy ezdemo extension) as something to extend rather than completely replace.  I used bundle extension, thinking I would be able to override everything I didn't need while reusing things that already worked well (e.g. nearly all of the content field templates, which would be needless work to rewrite).

It is no longer recommended to use and extend the demo bundle, then?

Friday 28 November 2014 4:34:20 pm

Hi

This has never been recommended. DemoBundle is only a demo, showcasing eZ features and how to implement them.

Friday 28 November 2014 7:13:36 pm

Hello All,

@Jérôme

I think this fact should be much more clearly documented in several locations. We see people failing in this regard all too often because of it.

Cheers,
Heath 

Sunday 30 November 2014 10:02:40 pm

Quote from Jérôme Vieilledent :

Hi

This has never been recommended. DemoBundle is only a demo, showcasing eZ features and how to implement them.

Thanks for the clarification.  I agree that this would have been nice to see spelled out in the docs.

expandshrink

You must be logged in to post messages in this topic!

36 542 Users on board!

Forums menu

Proudly Developed with from