TinyPortal

Development => Block Codes => Topic started by: marzi on March 04, 2021, 04:21:52 PM

Title: Front Page
Post by: marzi on March 04, 2021, 04:21:52 PM
SMF 2.0.18  and TinyPortal 2.0.1 How to have an article only in the center on the front page. Used to be so easy in very early versions of Tiny Portal or I am getting dotty.
Title: Re: Front Page
Post by: lurkalot on March 04, 2021, 06:01:42 PM
marzi, you mean a singe article? 

Possible to post some sort of example of what it should look like?
Title: Re: Front Page
Post by: marzi on March 04, 2021, 07:48:07 PM
Thank you for the outreach. Attachment TP_1 is what I currently have, and TP-2 is what I would like it to be. I have created an article in General Articles and have toggled featured on, but it is not showing up.
Title: Re: Front Page
Post by: lurkalot on March 04, 2021, 08:00:42 PM
Quote from: marzi on March 04, 2021, 07:48:07 PM
Thank you for the outreach. Attachment TP_1 is what I currently have, and TP-2 is what I would like it to be. I have created an article in General Articles and have toggled featured on, but it is not showing up.

marzi, what are your front page settings set to please? 

Promoted topics only
Promoted topics + articles - sorted on date
Only forum-topics
Forum-topics and articles - sorted on date
Only articles
Featured article with frontpanel
Frontpanel only
Go directly to forum index

Also, are you using that article as a welcome/intro to your site?  If so you could just add the same thing in a Upper panel block, or Front panel block to achieve the same look. 

Title: Re: Front Page
Post by: marzi on March 04, 2021, 09:06:56 PM
I would like to use as a Welcome landing page as soon as a visitor arrives.The settings for the front page are seen in the attachment TP-3. I have not changed the panel configuration since installing yesterday. Once again, many thanks.
Title: Re: Front Page
Post by: lurkalot on March 04, 2021, 10:21:18 PM
Quote from: marzi on March 04, 2021, 09:06:56 PM
I would like to use as a Welcome landing page as soon as a visitor arrives.The settings for the front page are seen in the attachment TP-3. I have not changed the panel configuration since installing yesterday. Once again, many thanks.

Ok, I would seriously just add that content to a block on the front page like I mentioned above. 

But never the less, the article should display if it's marked as featured, it also needs to be approved and active before it will show.

If this is on a test site, or a site where you can PM me a test login, I'll gladly take a look at this for you.
Title: Re: Front Page
Post by: marzi on March 05, 2021, 01:05:50 PM
I would be glad to PM you but apparently I am not permitted to do so according to the software.
If you send me an email to: tplurk@marscafe.com  I will reply with my test site's URL, Login and password.
Title: Re: Front Page
Post by: lurkalot on March 05, 2021, 05:44:15 PM
Quote from: marzi on March 05, 2021, 01:05:50 PM
I would be glad to PM you but apparently I am not permitted to do so according to the software.
If you send me an email to: tplurk@marscafe.com  I will reply with my test site's URL, Login and password.

Hi, yes sorry forgot about the post count restriction for PM's I have upped your post count so you should be able to PM me now.
Title: Re: Front Page
Post by: marzi on March 05, 2021, 06:03:03 PM
Thanks.
https://www.marscafe.com/smf/index.php

Edited: to remove login details from public view.
Title: Re: Front Page
Post by: lurkalot on March 05, 2021, 06:41:12 PM
Quote from: marzi on March 05, 2021, 06:03:03 PM
Thanks.
https://www.marscafe.com/smf/index.php

Edited: to remove login details from public view.

Ok, there's certainly something wrong with your install as none of the article settings such as Featured will stick.  I will try and replicate this on my test sites and come back.

Meanwhile I've added the text to a block on the front page to show you what I was talking about.
Title: Re: Front Page
Post by: lurkalot on March 05, 2021, 08:04:33 PM
Seems to work fine on my test site.  Can I ask where you downloaded the TinyPortal zip from please?
Title: Re: Front Page
Post by: lurkalot on March 05, 2021, 08:24:39 PM
marzi, do you have ModSecurity turned on on your server by any chance.  If yes could you turn it off, or get it turned off.
Title: Re: Front Page
Post by: lurkalot on March 05, 2021, 08:27:14 PM
Reason I ask is you're having the exact same symptoms as mentioned in this post, https://www.tinyportal.net/index.php?topic=36013.0 

I can't get any of those toggles to stick.
Title: Re: Front Page
Post by: marzi on March 05, 2021, 09:32:11 PM
I did verify the folder and file permision settings after installing the package on my server. Folders were all 755 and files 644
Title: Re: Front Page
Post by: marzi on March 05, 2021, 09:35:20 PM
I have a Tiny Portal+SMF running on the same server without any issues and has been OK for about 12 years so far. But I will check with my host.
Title: Re: Front Page
Post by: marzi on March 05, 2021, 10:00:49 PM
Modsecurity is turned on on the shared server I am hosted on. It can be whitelisted but that is all. I am not sure I would want that security feature disabled on my server or that it is the reason, since I have not seen any error messages implicating Modsecurity. I am going to do a clean reinstall. I downloaded Tiny Portal from tinyportal.net and the SMF software from simplemachines.org
Thank you for all your very professional efforts after the clean reinstall I will post a followup message as to how the ship is navigating.
Title: Re: Front Page
Post by: lurkalot on March 05, 2021, 10:07:37 PM
Quote from: marzi on March 05, 2021, 10:00:49 PM
Modsecurity is turned on on the shared server I am hosted on. It can be whitelisted but that is all. I am not sure I would want that security feature disabled on my server or that it is the reason, since I have not seen any error messages implicating Modsecurity. I am going to do a clean reinstall. I downloaded Tiny Portal from tinyportal.net and the SMF software from simplemachines.org
Thank you for all your very professional efforts after the clean reinstall I will post a followup message as to how the ship is navigating.

Mod security is renowned for causing issues, I'd recommended turning it off.
Title: Re: Front Page
Post by: tino on March 06, 2021, 12:04:16 AM
Are you sure it's not a high level of cache enabled ? That causes issues sometimes
Title: Re: Front Page
Post by: lurkalot on March 06, 2021, 12:10:06 AM
Quote from: tino on March 06, 2021, 12:04:16 AM
Are you sure it's not a high level of cache enabled ? That causes issues sometimes

Do you mean Cache setting in SMF tino? I'd already turned that off earlier while I was testing.
Title: Re: Front Page
Post by: tino on March 06, 2021, 02:07:46 AM
Quote from: lurkalot on March 06, 2021, 12:10:06 AM
Quote from: tino on March 06, 2021, 12:04:16 AM
Are you sure it's not a high level of cache enabled ? That causes issues sometimes

Do you mean Cache setting in SMF tino? I'd already turned that off earlier while I was testing.

I did, modSecurity shouldn't cause issues if it's configured correctly.
Title: Re: Front Page
Post by: lurkalot on March 06, 2021, 05:21:01 AM
Thanks tino, yes I had wondered if it was a caching issue while I was looking at those settings on marzi's website, although it was set to level one (Recommended) I tried no caching, that made no difference.

The mod security was just something I wanted to rule out because I know it can cause weird stuff to happen, and while I agree it should be fine if set up correctly it very often isn't  depending on hosting used. I used to have nightmares with this on HostGator for example.

The issue I'm seeing on that site is the toggles for Sticky, Locked, Show on front page, Featured, won't stay set and return to their previous state when you refresh the page.
Title: Re: Front Page
Post by: tino on March 06, 2021, 10:05:56 AM
If you inspect the element and look at the network tab you can see if a 404 or similar error is returned.

Is that both on the list page and from within the article itself?
Title: Re: Front Page
Post by: lurkalot on March 06, 2021, 10:31:30 AM
tino, I can't check to confirm that now as it appears marzi has removed the site as per 

Quote from: marzi on March 05, 2021, 10:00:49 PM
Modsecurity is turned on on the shared server I am hosted on. It can be whitelisted but that is all. I am not sure I would want that security feature disabled on my server or that it is the reason, since I have not seen any error messages implicating Modsecurity. I am going to do a clean reinstall. I downloaded Tiny Portal from tinyportal.net and the SMF software from simplemachines.org
Thank you for all your very professional efforts after the clean reinstall I will post a followup message as to how the ship is navigating.

But yes I'm pretty sure I did check those toggles in both the article list page and the article itself, and in both cases they wouldn't stick and just reverted on page refresh. 
Title: Re: Front Page
Post by: marzi on March 06, 2021, 01:33:44 PM
The same issue persisted after I uninstalled Tiny Portal and did a clean reinstall of it with a newly downloaded Package from tinyportal.net.
Because I have a fully functioning earlier version of a SMF/Tiny Portal web site on the same server I have decided that I will retain Modsrcurity on my domain and pass on the new version but thank you for so much professional effort and interest.
Even with technology, sometimes-as they say in the hills of Kentucky-"when the old a-be-a-gone the best a-be-a-gone".
Title: Re: Front Page
Post by: lurkalot on March 06, 2021, 02:03:36 PM
Quote from: marzi on March 06, 2021, 01:33:44 PM
The same issue persisted after I uninstalled Tiny Portal and did a clean reinstall of it with a newly downloaded Package from tinyportal.net.
Because I have a fully functioning earlier version of a SMF/Tiny Portal web site on the same server I have decided that I will retain Modsrcurity on my domain and pass on the new version but thank you for so much professional effort and interest.
Even with technology, sometimes-as they say in the hills of Kentucky-"when the old a-be-a-gone the best a-be-a-gone".

marzi, pretty sure what ever the issue is it's related to ether mod security (that's my bet) or some other server config thing, as I can't replicate your issue. 

If you're worried about turning off mod security you're already at risk anyway as your running SMF 1.1 RC3 and TinyPortal v0.9.6beta (Now there's a blast from the past) lol..
Title: Re: Front Page
Post by: tino on March 06, 2021, 02:43:29 PM
I'd like to know if there are error's being returned when you try and set them, could you PM me a login / password to investigate?

TinyPortal 0.9.6 has some security issues logged against it, as does SMF 1.1 so I would strongly recommend updating it.
Title: Re: Front Page
Post by: lurkalot on March 06, 2021, 03:06:33 PM
Quote from: tino on March 06, 2021, 02:43:29 PM
I'd like to know if there are error's being returned when you try and set them, could you PM me a login / password to investigate?

TinyPortal 0.9.6 has some security issues logged against it, as does SMF 1.1 so I would strongly recommend updating it.

Pretty sure the site has gone in the bin tino.  I have a test login but as you can see from the link below, only the old main site is still there.  I didn't have a chance to inspect those elements in the network tab, the site was gone when I went back to it, but there was no errors generated in the SMF error log I can say.

Quote from: marzi on March 05, 2021, 06:03:03 PM
Thanks.
https://www.marscafe.com/smf/index.php

Edited: to remove login details from public view.

Title: Re: Front Page
Post by: marzi on March 06, 2021, 04:15:30 PM
inyPortal 0.9.6 has some security issues logged against it, as does SMF 1.1 so I would strongly recommend updating it.

I m aware of that and that is a reason I want to continue running Modsecurity on my domain. Additionally, the amount of work it would take to upgrade is enormous as I recall all the page change code I had to insert  for all the packages I have added on. When I retire I will probably do that upgrade as I will have the time needed. I agree with you that the fundamental problem is server related, but The author(s) of Tiny Portal should be able to re-code or re-engineer entirely how the article system, is structured. I am sure that is a lot,lot less complicated than messing with a web server's software. I only mention that because the link you sent me to visit on these forums indicates mine issue of "toggling" is far from an isolated one. Everyone related with Tiny Portal have always be excellent and you can see I go way-way back as a user of it.
Title: Re: Front Page
Post by: tino on March 06, 2021, 04:46:09 PM
If you could provide me with a link and login so I can investigate I might be able to resolve it. I can't here with mod_security enabled and configured correctly.

I can't fix something which I can't find out why it's broken.

Also enabling mod_security won't stop people using the exploits which are shown to exist against 0.9.6. It doesn't actually help in anyway against those.

Separately 'messing' with a web servers software is trivial in comparison with the code. I can create a whole web stack within 30minutes (mainly waiting for things to happen), coding would take me longer, although if I don't know the actual cause then I'd be there forever. 
Title: Re: Front Page
Post by: tino on March 06, 2021, 09:02:31 PM
Also

QuoteShould I use mod_security?
If uncertain, consult your developer before enabling!

Now, this is difficult question. *IF* you are able to confirm that your rulesets do not interfere with your websites functionality, there is no reason not to use mod_security. However, if your website requires numerous, custom POST requests, it's most likely mod_security will interfere with your websites' core functionality and should be avoided.

My advice is to allow the get and post requests that TinyPortal makes for tpadmin and not block those as they are not a security threat.

That's if it is causing the issue, which I don't know atm.
Title: Re: Front Page
Post by: marzi on March 07, 2021, 12:12:04 AM
lurkalot • BTW// Sorry that I was not clear but I removed all the new smf and tiny portal files from my test site plus deleted the smf database that supported the experiment.

Tino, I believe you mentioned or implied the "GET" protocol being used. Over the years my experience is that using the "GET HTTP Request Method" results in complications.
Title: Re: Front Page
Post by: tino on March 07, 2021, 12:56:18 AM
The GET and POST methods are how the internet is run, without them you wouldn't be able to view any web pages ( GET ) or input any data ( POST ) if you're that concerned about them you need to not use a web enabled device.