Enabling Full Content Swap

Permalink
Hi Everyone,

I have a theme in for approval at the minute and the PRB has said it would benefit from having Full Content Swap enabled.

I've followed the instructions that I can find, and the final step says there'll be trial & error required to get the content swap working. I've trialled & errored for about a week now with no luck. This is the smallest error I'm seeing in the current draft. I don't know what else to try.

Call to a member function getRootTreeNodeObject() on null


I'm more a front end & design theme developer so a lot of the XML stuff is over my head. Can anyone suggest where I might be going wrong? I've been getting the same error with 5.7.4.2 & 5.7.5.2

Thanks
Steve

C5ThemeTeam
 
Steevb replied on at Permalink Reply
Steevb
C5ThemeTeam replied on at Permalink Reply
C5ThemeTeam
Hi Steevb

Thanks for the reply. Yeah I used this tool to package up all my uploaded images and then generate the content.xml file.

I'm struggling to work out what I need to pull out of this generated file to get rid of errors.
rge replied on at Permalink Reply
Hello,

When using the generator to create the XML I received an error as well. The problem was an error in one of my custom blocks. It was hard to find since the block it self did not trow an error.

I tested it by doing a clean install without any blocks installed. I got no error when than I started adding my custom blocks one by one.

What you can try is make a second install without custom blocks (if you have any) and than run the generator to see if it is error free.
C5ThemeTeam replied on at Permalink Reply
C5ThemeTeam
Hi,

I don't have any custom blocks but I have custom templates applied to images. Might this be whats causing the error?
rge replied on at Permalink Best Answer Reply
I don't think so. Regarding to the xml. As noted in the documentation make sure you only add your own content and don't overwrite content from the dashboard etc. In the attachment you can find a small example.

In the xml look for your own content you can need the following tags:
themes
pagetemplates
pages
stacks

Example
<?xml version="1.0"?>
<concrete5-cif version="1.0">
  <themes>
    <theme handle="package_name" package="package_name" activated="1"></theme>
  </themes>
  <pagetemplates>
    <pagetemplate icon="full.png" name="Blog" handle="blog" package="package_name" internal=""></pagetemplate>
    <pagetemplate icon="full.png" name="Blog Entry" handle="blog_entry" package="package_name" internal=""></pagetemplate>
    <pagetemplate icon="full.png" name="Full" handle="full" package="" internal=""></pagetemplate>
    <pagetemplate icon="full.png" name="Home" handle="home" package="package_name" internal=""></pagetemplate>
  </pagetemplates>
    <pages>
    <page name="Home" path="" filename="" pagetype="" template="home" user="admin" description="" package="">
      <area name="Main">
        <blocks></blocks>
C5ThemeTeam replied on at Permalink Reply
C5ThemeTeam
Great. I'll try this later today.

I'm not looking at my XML file now but I do remember having a
<package>
in there.

Should I delete this also?

Thanks
Steve
rge replied on at Permalink Reply
Only included things that you have added in the theme. So if you have installed a package in your theme than add it in the xml. Otherwise you can leave it out.

Also in the pages tag make sure you only add the thinks you have added. Your pages and your content.

An other xml example can be found in the core of concrete:
concrete/config/install/packages/elemental_full/content.xml
C5ThemeTeam replied on at Permalink Reply
C5ThemeTeam
Thanks a million for the advice. Will give this my full attention later and report back.

I was going to use the Elemental theme as a template but when it wasn't part of a package I thought against it.

Thank you again.
C5ThemeTeam replied on at Permalink Reply
C5ThemeTeam
This worked perfectly, first time. These instructions should really be added into the guidelines in the official docs imho.

Thanks for the help.