Closed GregLeonhardt closed 1 year ago
Do you have a bunch of recipes in this test? When i try this with just 1 recipe, i cannot reproduce.
Well that's curious. I created a clean install just to confirm it wasn't being caused by anything else.
As to the number of recipes: I see the problem on the first the first through last. If there are already recipes saved, the new one will be displayed for 90 seconds then vanish. If you can enter multiple recipes within 90 seconds everything that is less than 90 seconds old will be displayed.
I just had a thought and went into the database with MySQL Workbench and updated the 'date' column to a current date/time and the recipe title once again appeared. (Well until 90 seconds after the time I entered then it vanished again.)
The page I am looking at is Home -> Recipes or Home -> Recipes -> {Recipe Category}
I attached the FCMS log. Let me know if there is another that could shed some light on the problem.
Server version: Apache/2.4.25 (Raspbian) Server built: 2021-07-09T08:12:34
You say that you can't reproduce the problem. Are you testing with 3.7.0 or a compilation of fixed that will eventually be in 3.8.0? If it's the later then this is most likely a duplicate of #553 and nothing else is required. The main difference is that I do NOT see any errors in the log when this error occurs.
inc/datetime.php @ 314 $mins = round($diff / MINUTE_IN_SECONDS); which is used @ line 321 $since = sprintf(T_ngettext('%s minute ago', '%s minutes ago', $mins), $mins);
Eventually the execution flow gets to inc/thirdparty/php-gettext/gettext.php @ 379 ngettext($single, $plural, $number){
Now if "$this->short_circuit" is true everything just works. However if "$this->short_circuit" is NOT true the code will work it's way to inc/thirdparty/php-gettext/gettext.php @ 352 select_string($n){
This function starts with starts with: if (!is_int($n)) { throw new InvalidArgumentException( "Select_string only accepts integers: " . $n);
The problem is that round( ) returns a float which is incompatible with select_string() as it requires $n to be an int.
It's beyond my ability to determine when and why 'short_circuit' is set true. I can only say that in my installation it is false when displaying recipes.
Sorry, I did test this on 3.8.0, so hopefully it is a duplicate.
Recipes are being dropped from the 'Recipes" page 90 seconds after being entered.
Test Method: 1) Enter a new recipe 2) After the formatted recipe is displayed click 'Recipe Categories'
3) Wait 90 seconds (from when the recipe was first entered) and click the web browser refresh button.
4) Go back to the 'Home' page and click on the recipe title in 'What's New'.
In conclusion the recipe itself is still in the system but after the announcement falls off the home page it will be inaccessible.
The above steps reproduced the error with a clean install of 'fcms-3.7.0'