Camen Design Forum

Posts are being saved as _.rss then __1.rss

append delete Rogue

Hello, I'm currently having an issue where the first post in a folder gets named _.rss when a second, third and fourth post is made, they get called __1.rss, __2.rss, __3.rss and so on.

How would I make it so the filenames are taken from the title like on this forum.


Reply RSS


append delete #1. nkrs

Which version of PHP are you running on your server? My guess is that you're running either PHP before version 5.4 which doesn't have the transliteration API [1], or that the extension is installed but not enabled.



append delete #2. Rogue

I am using Arvixe hosting with PHP 5.4 enabled using the .htaccess command as I'm unable to set it any other way. If I use anything below 5.4 I get errors on the transliterator.

The command I'm using is.

% .htaccess
# Enable PHP 5.4 on Arvixe hosting
AddHandler application/x-httpd-php54 .php54 .php

:: @Rogue added on 19 Jan ’15 · 11:28

I did find this thread[1], which _had_ a fix but it seems to be down... Maybe someone here got the file backed up somewhere?



append delete #3. Martijn

According to the comments Kroc left in the transliteration function it could be another bug all together as the `iconv` function (used when `transliterator_transliterate` is unavailable) may also be to blame:

% Comment from /lib/functions.php
//old iconv versions and certain inputs may cause a nullstring. don't allow a blank response

But assuming the problem is with `transliterator_transliterate` there are two things you can test.

First there is this replacement for /lib/functions.php that implements my proposed fix [1]:

Second there is this replacement for /lib/functions.php that removes the whole `transliterator_transliterate` block, much like @SteTaylor had done:

Note that both these files are based on the master release, so if you are using the development release [2] of NoNonsenseForum they are not going to work for you.

I hope this can get you started!



append delete #4. Rogue

Thank you @Martijn,
Both of the proposed fixes have the same result. If the title is "Bob owned a boat" the file would be saved as "bobownedaboat.rss" which is much better than how they were originally being saved, so I will probably stay with your fix.

Its interesting how a different software can end up breaking something that works fine for others.

append delete #5. Martijn

I agree. Mostly is seems that `transliterator_transliterate` is just really fickle. If my fix worked, with the extra check, that would mean your version of PHP is compiled with the `transliterator_transliterate` function in place, but without the proper transliteration modules to actually do the transforms.

It is good to get some confirmation on the fact that it works though! So I have updated the issue [1] with that.

If the title is "Bob owned a boat" the file would be saved as "bobownedaboat.rss" which is much better than how they were originally being saved, so I will probably stay with your fix.

This is pretty weird, I wonder why the spaces are being dropped. But at least it is loads better than just underscores! Sticking with my fix means that you should transparently get real `transliterator_transliterate` support if the server is updated, so that is definitely the preferred one of the two.



append delete #6. Rogue

Thank you for explaining that. If there anything you want trialed on a "derpy" server just ask. It would be nice to see this forum move forward a little bit in the way of community developed content. In fact I have seen a lot of content, just the user has to dig around to find it.

Would it be worth-while to have a themes and modifications and requests folder created to help sort it out?

:: @Rogue added on 19 Jan ’15 · 16:25

It also seems that the page <title> isn't automatically generated. Using a stock master install and while using the modified functions.php

:: @Rogue added on 19 Jan ’15 · 19:18

It would seem there is something very odd with my webhosting. There are a number of features which just arent working. I have requested a PHP5.4 reinstall and will see how it is going afterwards.

I hope it solves all the issues as NNF is something that I really want to use. I will keep this thread updated I guess.


(Leave this as-is, it’s a trap!)

There is no need to “register”, just enter the same name + password of your choice every time.

Pro tip: Use markup to add links, quotes and more.

Your friendly neighbourhood moderators: Kroc, Impressed, Martijn