Export/Import Rapid Weaver Blog?

@dan @thominator @upssjw

OK Here’s a big update on what has been going wrong with my blog and how to fix it.

  1. My website (because it’s been up for ever) was using php 7.2
  2. php 8 needed to be enabled for my website by the web host. At that point the main blog page started to work but linked files were still not found.
  3. That turns out to be a path error problem that needs correction on my end. According to the tech I was speaking with, the path “was looking one folder to far” for the files. He edited the files on his end by removing one ../ and everything started working.

The original heading that does not work is below and looks like this:

require_once _DIR_ . ‘/../../../rw/elements/com.realmac.corepack/api/vendor/autoload.php’;

}

// Ensure the CMS helper functions are available
if (!function_exists(‘cms’)) {
require_once DIR . ‘/../../../rw/elements/com.realmac.corepack/api/cms.php’;
}

// Include centralized Twig setup
require_once DIR . ‘/../../../rw/elements/com.realmac.corepack/api/twig-setup.php’;

// Immediately Invoked Function Expression (IIFE) to encapsulate logic and avoid polluting global$
(function () {
// CMS Item Setup - Comprehensive logic for fetching item
$ECMS_Item_sourcePath = ‘../../../blog/cms/posts’ !== ‘’ ? ‘../../../blog/cms/posts’ : '../..$
$ECMS_Item_slug = null;

The edited version for the blog “post” file that does work looks like this:

require_once _DIR_ . ‘/../../rw/elements/com.realmac.corepack/api/vendor/autoload.php’;

}

// Ensure the CMS helper functions are available
if (!function_exists(‘cms’)) {
require_once DIR . ‘/../../rw/elements/com.realmac.corepack/api/cms.php’;
}

// Include centralized Twig setup
require_once DIR . ‘/../../rw/elements/com.realmac.corepack/api/twig-setup.php’;

// Immediately Invoked Function Expression (IIFE) to encapsulate logic and avoid polluting global$
(function () {
// CMS Item Setup - Comprehensive logic for fetching item
$ECMS_Item_sourcePath = ‘../../blog/cms/posts’ !== ‘’ ? ‘../../blog/cms/posts’ :
‘../../rw/elements/com.realmac.corepack/api/examples/content/blog’;

  1. My question to you is how do I set these paths up in Elements so it will continue to work after I upload new content?

Another blog question just came up.

As I was populating past posts I noticed that my Archive page is only showing 20 posts even though there are more than twenty in my cms posts folder at this point.

How do I fix this?

OK I answered my own question.

You have to drop the cms collection pagination component into the after section which adds another page.

Well, unfortunately, here I am again. My blog was working fine for a few weeks then, after updating some other pages recently, it stopped working out of the blue. I’ve spent another few days trying to get it back but no luck. This is hugely frustrating!

Right now the Archive page that’s online still works but the main blog page, no matter what I try to do or reset, does not.

Locally neither the Blog or the Archive page works in browser preview.

I downloaded Thom’s ebook to check everything again and can’t find where the problem might be.

I’ll add that the blog page comes up with all menu’s fully dropped down along with a Fatal Error twig syntax message.

Fatal error: Uncaught Twig\Error\SyntaxError: Unexpected character “&” in “__string_template__53e278cd9b016378087f78c32c8e6b44” at line 5.

And if I take all of the CMS components out of the page the header and footer links work correctly.

Suggestions?

I suggest you post the project here and let the blogsperts help. If you do not want to make it public, upload to cloud and send link to support.

I totally disagree with this. I have two blogs that have worked perfectly from the minute I ported my sites from Classic. For me, there are no issues using the CMS for a blog. Many of my posts are ones I brought over from Alloy, and I have no problems getting them working in Elements.

I even use the CMS for a detailed dimensions table for the products we manufacture, and it handles it without any issues. Actually, very useful. My cookie consent popup is even driven by the CMS!

The only issue I ran into when first getting all this going is the fact that Elements will convert any files you have with mixed case names into all lowercase. Once I fixed those issues, it was plain sailing.

1 Like

It looks like you may have changed something in the Twig syntax you’re using in your blog.

From my experience, this error usually occurs when Twig encounters a character it can’t interpret properly—in your case, the & (ampersand).

It’s likely that somewhere during the syntax transformation, an extra space or some unintended character is being introduced where it shouldn’t be.

I ran into this quite often at the beginning, and even now it still happens from time to time. It most commonly occurs when I copy pages or duplicate components that contain Twig syntax.

Without seeing your project or the affected pages, it’s obviously quite difficult to pinpoint the exact cause.

What works well for me is to always write Twig syntax as a one-liner first, then copy and paste it as plain text.

In general, I’ve already mentioned this issue to Ben before, so I’m not sure if it’s still on the radar or whether it will be addressed in the future.

Thom, I cannot thank you enough for suggesting the One Markdown App. As part of my work backing up a friends website, I’ve been doing all the text converting by hand to md.

It took less than a minute to cleanup today’s post using the One Markdown App