Giter Site home page Giter Site logo

Mostly lost recipes about fcms HOT 4 CLOSED

GregLeonhardt avatar GregLeonhardt commented on June 10, 2024
Mostly lost recipes

from fcms.

Comments (4)

ryanhowdy avatar ryanhowdy commented on June 10, 2024

Do you have a bunch of recipes in this test? When i try this with just 1 recipe, i cannot reproduce.

from fcms.

GregLeonhardt avatar GregLeonhardt commented on June 10, 2024

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.

===================================================================
Distributor ID: Raspbian
Description: Raspbian GNU/Linux 9.13 (stretch)
Release: 9.13
Codename: stretch

PHP 7.0.33-0+deb9u10 (cli) (built: Oct 6 2020 17:08:28) ( NTS )
Copyright (c) 1997-2017 The PHP Group
Zend Engine v3.0.0, Copyright (c) 1998-2017 Zend Technologies
with Zend OPcache v7.0.33-0+deb9u10, Copyright (c) 1999-2017, by Zend Technologies

mysql Ver 15.1 Distrib 10.1.48-MariaDB, for debian-linux-gnueabihf (armv7l) using readline 5.2

Server version: Apache/2.4.25 (Raspbian)
Server built: 2021-07-09T08:12:34

log_2021-07-14.txt

from fcms.

GregLeonhardt avatar GregLeonhardt commented on June 10, 2024

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.

from fcms.

ryanhowdy avatar ryanhowdy commented on June 10, 2024

Sorry, I did test this on 3.8.0, so hopefully it is a duplicate.

from fcms.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.