Page 1 of 1

Topic views added when publishing

Posted: Thu Jan 12, 2023 6:06 pm
by dart
Hello,
When logged in to the (admin log panel), any changes I make to a new adds a view number... one post topic ends up with 4 to 6 views from myself before I publish it... noticed for a couple of days now. It would always be 0 views when published by admin. No new changes have been made.

Re: Topic views added when publishing

Posted: Sat Jan 14, 2023 3:30 pm
by dart
applied maintenance...
Rebuild index
Purge theme and templates cache
Restore file permissions

...and still same issue. even in edit mode adds view counts to topics. cannot get an accurate view count since 2 weeks now.

Re: Topic views added when publishing

Posted: Sat Jan 14, 2023 6:38 pm
by fraenkiman
Hello dart,

I would like to try to reproduce the problem.
Which FlatPress version are you using?
Please add some screenshots to illustrate.

With best regards
Frank

Re: Topic views added when publishing

Posted: Sun Jan 15, 2023 2:31 pm
by dart
I have had version 1.21 for some time now & did not have this issue.

a screen won't show anything pertinent to this problem.

the issue:
When LOGGED in...
Adding a new topic starts at '0 views' as it should.
So while in admin mode I add info to the topic & click on 'preview' before posting. it will add '1 view number' or if I have to enter again while logged in & add something, it adds another view.
Before 2 weeks ago it was not doing this - by the time I posted something it started out with '0' views.
The last topic I posted yesterday today shows 13 views - so based on this number, I know there were really 10 views from others besides me not 13.
I should have renamed this topic as 'inaccurate view issue'.

PostView plugin counts unexpectedly in preview

Posted: Tue Jan 17, 2023 9:15 pm
by fraenkiman
Hello dart,

thank you for the detailed description. There might be an issue with the PostView plugin. Unfortunately, the plugin does not work at all in the current developer version 1.3.dev #826. See issue 182 on Github.

But you are welcome to test another FlatPress instance the last FlatPress developer version 1.3 from 02.October 2022, which still ran with Smarty 2.6; if here also the same problem occurs.
I can neither reproduce the phenomenon with fp 1.2.1-Demo nor with the October version.

Please let me know so that we can work together to isolate the problem.

With best regards
Frank

Re: Topic views added when publishing

Posted: Fri Jan 20, 2023 10:14 pm
by dart
strange, views were always working fine & now when you click on a post & go back to front page, it will show 2 more views ?!

I disabled the postview plugin & ran a complete maintenance.
Then enabled it again & ran full maintenance again & still not fixed.
I tried 2 full backups & the same issue.
Will try the updates and see if it resolves it - thanks for the suggestion.

Re: Topic views added when publishing

Posted: Sat Jan 21, 2023 10:59 am
by George
installed flatpress 1.2.1 on a test site, topic views works using php 7.2.24 and smarty2.6
i then upgraded php to 8.0.21 with smarty 2.6 and it worked fine
it completly fails using php 8.1.8 and smarty 4
tested using php 8.1.8 snd smarty 2.6 the view post worked even with all the php warnings, so i suspect the code needs rewriting for smarty 4

Re: Topic views added when publishing

Posted: Sun Jan 22, 2023 1:15 pm
by dart
PHP Version 7.4.21 here. 1.2.1 always worked well tho. Have not had much time to try some other tests, but for now will have to adapt using it like this. I tried unpacking a backup from before this issue surfaced & same issue.

Re: Topic views added when publishing

Posted: Sun Jan 22, 2023 4:28 pm
by dart
wow :? this is whacky today - 3 views tabulated per every one view