Issue with Blog URLS

Hi there, I’m having issues with my Blog URLs over at;

http://clearcontracting.co.uk/blog/

The URLS just don’t look right for posts that are on there - I posted on the old forum, but now can’t login over there…

Thanks @roblb - yes this is the new blog and that old stuff is archived for reference

Re: http://pulsecms.com/forum/index.php?p=/discussion/168/blog-url-issue#latest

Can you share the config.php (without revealing the password) here - just the part about the blog and see how the URLs are working

Also make sure you are using the htaccess included with the download

Cheers

Hi,
I am using the default htaccess that comes with Pulse… the forum isn’t letting me upload the config.php but here are the contents of it…

<?php // GENERAL // Tip: Copy only the contents of the "pulse" folder into the site root, not the folder itself. // If you want to install in a subfolder, you can, but it must be reflected in the path setting. $path = '/blog'; // If installed in root, leave blank. If in "subfolder", use "/subfolder" $admin = 'admin'; // Admin folder name $password = ''; // Admin login $autobackup = true; // Turn on/off auto-backup feature date_default_timezone_set('America/New_York'); // More: https://php.net/manual/en/timezones.php $language = 'english'; $pulse_serial = '' ; $anonymize_ip = false; // EDITOR $wysiwyg = true; // Toggle on/off WYSIWYG editor in blocks and blog $allow = array('txt','jpeg','gif','jpg','svg','png','pdf','zip'); // File types allowed to be uploaded // MEDIA $jpeg_quality = '85'; // Use 100 for full jpeg quality (larger files) $jpeg_size = '1200'; // Scale jpegs to a max pixel size $thumbnail_height = '120'; // FORM $mail_inputs = array('Name'=>'text','Email'=>'email','Phone'=>'text'); // Input fields $lang_form_name = 'Name'; // Must match "Name" input above $lang_form_email = 'Email'; // Must match "Email" input above $mail_textarea = array('Comment'=>'7'); // 7 = Number of rows in comment textarea $email_contact = array('you@mail.com'); // Example: 'one@mail.com','two@mail.com' // Tip: To add more form fields, add to the $mail_inputs array // BLOG $result_per_page = 5; // Blog posts per page $disqus_comments = false; // Turn on/off blog comments (Disqus) $disqus_shortname = "sample-name"; // Your disqus account name $date_format = "M j, Y"; // More: https://php.net/manual/en/function.date.php // RSS $blog_title = 'My Blog'; $blog_description = 'This is my blog.'; $blog_url = "http://example.com/blog"; $rss_lang = 'en-us'; $url_prefix = 'blog'; // blog-1-post-title, if changed also edit htaccess cheers, rob

Can anyone help me with this - i’m stuck at the minute :frowning:

Have you tryed an other folder name than “blog”?

Is just the Blog made with Pulse or the wohle site under clearcontracting.co.uk?

just the blog is made with pulse. i didn’t really want to move it out of the blog folder really if i could help it… there are a few campaigns on there pointing to that link too.

Okay, what about the .htaccess file?
If your folder is called blog, i think you have to change the rewrite rules.

RewriteEngine On

#RewriteBase /

RewriteRule ^blog-page-([^-])$ ?page=$1&p=blog [L]
RewriteRule ^blog-([^-]
)+? ?d=$1&p=blog [L]

RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)$ index.php?p=$1 [L]

Adds SVG image support

AddType image/svg+xml svg svgz
AddEncoding gzip svgz

Okay, I have tested it, the folder name is not a problem.
What i think is curious is that some links are working correctly, like this one: http://clearcontracting.co.uk/blog/blog-10-tax-free-married-life

Are you naming your Blog .txt files correctly?

How should they be named?

Out of the documentation:

Posts are sorted by number, the highest number will be the latest post. So if the last post was ‘3.txt’, then the next post should be named ‘4.txt’.

For each post, there are three items that need to be filled out, title, date and the content. The only one that you must be careful with is the date. In order for it to display properly on the frontent, it must be in the following format.

mm-dd-yyyy

Do you give them ascending numbers and a meta title?
Can you give us a screenshot of your blog section?

Looks okay, does it worked before? Any changes?
What is your Hoster, did you tryed out with uncommenting the “Rewrite Base /” in the .htaccess?

it’s never worked unfortunately… I’ll try commenting out the Rewrite Base / in the htaccess and see what happens.

No joy with that one…
The page titles looks funny too…

Possibly, spaces aren’t allowed in the blog file name, maybe try Blog_Piece_4.txt

1 Like

No spaces, no words, just a ascending number 1.txt 2.txt 3.txt …

1 Like

More on this… it seems as if the filename does not follow the existing numbering then you get a URL to a blog entry that ALSO includes all of the other blog posts. For example do this:

  • Log into the Admin demo.
  • Go to and rename blog post number three from 3.txt to three.txt
  • Go to the live site and click on the 3rd post, “A Very Nice Blog Post”

You’ll now see that it shows the 2 other blog posts included on the single post :frowning:

So…the number-naming approach might need a rethink for version 5.
If the number-naming strategy is a Must, then perhaps there shouldn’t be a way to easily break the site blog just by renaming.

thoughts?

Hi @badcat,
The htaccess file looks for and passes the ID number of the blog post to Pulse so it can show the correct blog to the user. As you mentioned if the number is missing Pulse will just show the blog overview page and list all of the posts (or as many as you’ve specified per page).

I agree that the way Pulse deals with blog ordering and naming could be better.

doh… I totally know that (htaccess) and had forgotten completely as I was working on the Pulse Demo site.

O - still vote for better/more customizable ordering and naming.