0

A client wants to move a website they made using Adobe Catalyst to a different hosting provider. I was able to copy the entire website via FTP and move it to the new host. Everything looks fine except for many of the links leaving code that looks like this:

{module_contentholder, name="_U309"} {module_contentholder, name="_U299"}

Does anyone know what this is or how to fix it?

2 Answers2

2

Those are references to Content Holders. They work similarly to PHP's include statement, but the file they reference is fixed to a single path: /_System/ContentHolders/.

You will likely come across more tags like that, such as {module_menu} and {tag_pagecontent}. You'll need to manually adapt them to the whatever the new host uses. The documentation will help: http://docs.businesscatalyst.com/reference/


The obtuse names of the content holders shown in your example indicates the site was likely to have been generated by Adobe Muse, a WYSIWYG editor. I strongly recommend that you find the original .muse project files, and use those to update the site. Muse can compile the site for platforms other than Business Catalyst.

Robert K. Bell
  • 9,350
  • 2
  • 35
  • 50
0

Through research I found out there is no way to get those codes to display properly without editing each page individually. Fortunately, I wrote a PHP script that goes through the code of each page and replaces it automatically.

Step 1: Make a file in the index directory called replacement.php

Step 2: Put this code in

$file = $_GET['file'];
$path = '/path/to/public_html/' . $file;
$file_contents = file_get_contents($path);
preg_match_all("/{module(.*?)}/", $file_contents, $matches);
foreach($matches[0] as $match) {
    if(preg_match('/\"([^\"]*?)\"/', $match, $query)) {
        $queryNew = str_replace("\"", "", $query[0]);
        $queryPath = '/path/to/public_html/_System/ContentHolders/' . strtolower($queryNew) . '.html';
        $queryContents = file_get_contents($queryPath);
        $file_contents = str_replace($match, $queryContents, $file_contents);
    }
}

file_put_contents($path, $file_contents);

Step 3: Replace where it says /path/to/public_html/ to your domain files location.

Step 4: go to http://www.yourdomain.com/replacement.php?file=index.html to change over the index file. You can change "index.html" in the url to any other page you want converted.

Hopefully this helps someone else in the future.