Links to the blog posts no longer work

After updating to v. 1.1.2, the links to the blog posts no longer work. See video.
Any tips?

I can’t tell from the video, we’re going to need some more info! do you have a live url and/or project you can share?

I have sent you a message.

I just checked the project, and neither the Image or title text is linked, so that’s why when clicking on them it’s not going to the post page.

Link the component(s) you want to be clickable to the {{item.url}} and everything will work as expected.

Hope that helps :slight_smile:

1 Like

Strange. Worked before the update!

I’m having similar problems, but I’m close.

Long and windy details

On a page called blog, I have a collection, file name set to index.php.

The collection’s folder is set to news, which is a folder with a few Markdown files.

In the collection, the item template is set to the page newstemplate. The tag and author templates aren’t set.

The Items dropzone has a typography element, which contains {{item.title}} and the text “click here” linked to the URL {{item.url}}. I also have {{item.url}} as text, which appears as “../newstemplate/?item=post1” (or whatever).

The page newstemplate’s file name is set to index.php.

Newstemplate has a CMS item, source set to news. The URL parameter is set to Default (item).

The CMS item has a typography object, containing two lines, {{item.title}} and {{item.body}}

The overview

If I go to http://127.0.0.1:50538/newstemplate/?item=post1 in my browser, I see the post. Works fine.

http://127.0.0.1:50538/blog/ works fine, too (trailing slash required). The titles, url as text, and the “click here” link are all there, but the links don’t work.

Here’s an example: http://127.0.0.1:50538/blog/{{item.url}}, which shows up as %7B%7Bitem.url%7D%7D.

The {{item.url}} as text appears as ../newstemplate/?item=post1.

I’m clearly close - any thoughts about what I’m missing?

Many thanks in advance.

I think I self-rescued on this one. I changed the link in the collection to plain text from url. Links appear to be working.

Yes, it needs to be plain text :+1:

Here are my notes for adding a blog, posted here in case it’s of use to anyone else just learning, which includes me. Corrections most welcome.

First, the cast of characters:

  • A folder in the Pages sidebar for posts. Site visitors never see the name of this folder so the name can be snarky. Your Markdown files go here.
  • A page to use as an item template. This page name will appear in URL’s, so be polite.
  • Another page (or one already in existence, such as the home page) for the article list to go. Assuming you want an automatic list of articles. Your call, there.
  • Add a folder in resources for media if you want to keep your media files in a separate bucket.

Select the page you’re going to use as an item template in the pages sidebar. Set the file name in the inspector’s page settings to index.php. It’s probably not needed in the sitemap file, so that can be turned off.

Also set the file name for the page you’re going to use for your blog article list to index.php. These must be php pages, not html.

It’s probably helpful for testing to add a few Markdown files in the folder you created for your blog posts. Do this by dragging and dropping them from the Finder to this page in the Pages sidebar. They don’t go in Resources. Or, maybe they can. I’m still experimenting.

On your item template page, add a CMS Item element. Within that Item, add a Typography element. Set the CMS Item’s Source setting to the folder where you want to put your posts.

Add {{item.title}} and {{item.body}} to the typography.

Now add a CMS collection to the page you’re going to use for your blog article list.

Specify your posts folder in the Collection’s settings. Set the item template to the page you’re using for your article template.

Add element to the Items dropzone in the Collection. One or more things should be linked to CMS items as {{item.url}}. Note (see Dan’s post) they can’t be regular URL links, they need to be plain text.

Include images in your Markdown with a couple of steps.

Upload your images to public_html/resources/your-image-folder-name or drag them from the finder into your resources. They will get uploaded when you publish.

Reference the images in your Markdown file as ![alt text here](image path here).

Let’s say the image is called sailboat.jpg. If it’s in the top level of your resources in Rapidweaver, the path should be just sailboat.jpg. If it’s in a folder within resources, then the image path is foldername/sailboat.jpg.

If you published with an override website address specified, that affects this path. I publish to mysite.com/skunkworks for testing. Image links would need to be resources/skunkworks/sailboat.jpg.

Publishing to the production site would require some adjustments. The source folder for the collection and item objects, also links in Markdown files to media. If you’re old school, sed is your friend. BBEdit’s multifile search and replace is a little less geeky.

I would say I know something about maybe half the settings in Rapidweaver, which is enough to produce credible web pages. Open Graph in a CMS Item, for example. I don’t know what that does yet.

Keeping notes is probably a good idea.

Please let me know where I’m off base. It should be noted that the few steps set forth here will yield the world’s plainest blog. I wanted to figure out the mechanisms first, aesthetic seasoning last.

I probably don’t have all the details down. Right now, I can delete the files in the CMS’s Markdown direcotory/page and they still display. It’s like there’s a cache not getting cleared.

If you mean when previewing locally, then yes, the local preview cache doesn’t immediately remove Markdown files after you delete them from your project. A quick restart of Elements will clear that cache and update the preview :slightly_smiling_face:

If you’re seeing this on your live site, then it’s not a cache issue. Elements never deletes files from your server. So if a Markdown file has ever been published, but you later remove it from your project, it will still remain on the server until you remove it manually.

We do plan to improve the CMS syncing so that deleting a file on your server can also remove it from your project, but that isn’t available in Elements just yet.

Hope that clears things up, but do let us know if you have any more questions :slight_smile:

TL;DR - everything is fine, once again.

This was self-inflicted. I initially had trouble getting the CMS to work from newbie mistakes.

One of the things I tried was setting the folder in the page settings for my CMS items manually. My ham-handedness caused creation of an items directory in my public_html folder with the path home/userid/domains/domainname/skunkworks/news - in other words I ended up with the correct path, but relative to public_html, not root.

Clearing the manual folder specification fixed the problem.

The way I found it was I ftp’d my whole home directory to my local machine and grepped for a unique word from the working post. Finding two files of the same name was the forehead-slapper, initially causing me to doubt the integrity physics and spacetime.

Physics was fine, I wasn’t.

One of the things that makes the knowledge manager/note app Tinderbox useful is a community supported site called aTbref. Is there a community Wiki? If so, I’d like to donate toward hosting cost.