• Resolved mnroediger

    (@mnroediger)


    Hola, tengo un problema con un pods en concreto. Me da un error en el function.php en la siguiente linea:

    ‘group_price’ => $standar_price * (100 – $pod->field(‘group_price’)) / 100, //6-19

    Son grupo de precios y uno de ellos ha dejado funcionar con las actualizaciones de tema y plugins.

    El caso es que en la web original funciona. En la que falla es en la web de pruebas donde he hecho todas las actualizaciones.

    Está usando php 7.4, no se si se corregiría al pasar a php 8.1

    Alguna idea?

    Gracias

Viewing 3 replies - 1 through 3 (of 3 total)
  • Thread Starter mnroediger

    (@mnroediger)

    Hola, he activado el debug.
    
    Esto es lo que me aparece en el archivo debug:
    
    [12-Feb-2024 11:16:40 UTC] PHP Notice: Undefined variable: resume in /mnt/web009/d0/04/56730904/htdocs/STRATO-apps/wordpress_03/app/wp-content/themes/genesis-sample/functions.php on line 1158
    [12-Feb-2024 11:16:40 UTC] PHP Notice: Undefined variable: event in /mnt/web009/d0/04/56730904/htdocs/STRATO-apps/wordpress_03/app/wp-content/themes/genesis-sample/functions.php on line 1159
    [12-Feb-2024 11:16:40 UTC] PHP Notice: Undefined variable: price in /mnt/web009/d0/04/56730904/htdocs/STRATO-apps/wordpress_03/app/wp-content/themes/genesis-sample/functions.php on line 1160
    [12-Feb-2024 11:16:40 UTC] PHP Notice: Undefined variable: price_to_pay in /mnt/web009/d0/04/56730904/htdocs/STRATO-apps/wordpress_03/app/wp-content/themes/genesis-sample/functions.php on line 1161
    [12-Feb-2024 11:16:40 UTC] PHP Notice: Undefined variable: price_paid in /mnt/web009/d0/04/56730904/htdocs/STRATO-apps/wordpress_03/app/wp-content/themes/genesis-sample/functions.php on line 1162
    [12-Feb-2024 11:16:40 UTC] PHP Notice: Undefined variable: supplements in /mnt/web009/d0/04/56730904/htdocs/STRATO-apps/wordpress_03/app/wp-content/themes/genesis-sample/functions.php on line 1163
    [12-Feb-2024 11:16:40 UTC] PHP Notice: Undefined variable: method in /mnt/web009/d0/04/56730904/htdocs/STRATO-apps/wordpress_03/app/wp-content/themes/genesis-sample/functions.php on line 1166
    [12-Feb-2024 11:16:42 UTC] PHP Notice: Undefined variable: supp_ids in /mnt/web009/d0/04/56730904/htdocs/STRATO-apps/wordpress_03/app/wp-content/themes/genesis-sample/functions.php on line 188
    [12-Feb-2024 11:16:42 UTC] PHP Warning: Invalid argument supplied for foreach() in /mnt/web009/d0/04/56730904/htdocs/STRATO-apps/wordpress_03/app/wp-content/themes/genesis-sample/functions.php on line 188
    [12-Feb-2024 11:16:42 UTC] PHP Fatal error: Uncaught Error: Unsupported operand types in /mnt/web009/d0/04/56730904/htdocs/STRATO-apps/wordpress_03/app/wp-content/themes/genesis-sample/functions.php:206
    Stack trace:
    #0 /mnt/web009/d0/04/56730904/htdocs/STRATO-apps/wordpress_03/app/wp-includes/class-wp-hook.php(324): genesis_sample_enqueue_scripts_styles()
    #1 /mnt/web009/d0/04/56730904/htdocs/STRATO-apps/wordpress_03/app/wp-includes/class-wp-hook.php(348): WP_Hook->apply_filters()
    #2 /mnt/web009/d0/04/56730904/htdocs/STRATO-apps/wordpress_03/app/wp-includes/plugin.php(517): WP_Hook->do_action()
    #3 /mnt/web009/d0/04/56730904/htdocs/STRATO-apps/wordpress_03/app/wp-includes/script-loader.php(2262): do_action()
    #4 /mnt/web009/d0/04/56730904/htdocs/STRATO-apps/wordpress_03/app/wp-includes/class-wp-hook.php(324): wp_enqueue_scripts()
    #5 /mnt/web009/d0/04/56730904/htdocs/STRATO-apps/wordpress_03/app/wp-includes/class-wp-hook.php(348): WP_Hook->apply_filters()
    #6 /mnt/web009/d0/04/56730904/htdocs/STRATO-apps/wordpress_03/app/wp-includes/plugin.php(517): WP_Hook in /mnt/web009/d0/04/56730904/htdocs/STRATO-apps/wordpress_03/app/wp-content/themes/genesis-sample/functions.php on line 206
    
    Parece que todo es en el function.php
    
    No entiendo por qué la página en espa?ol va bien, y en inglés no.
    
    Esta es la página original que funciona bien
    
    https://tarifaexperience.com
    
    y está la página una vez actualizados plugin y theme, que es donde fallan los enlaces.
    
    test2.tarifaexperience.com
    
    Si retrocedo el plugin a una versión anterior, se podría solventar? 
    He probado con php8 y se rompen toda la web en inglés.
    
    un saludo
    Plugin Author Jory Hogeveen

    (@keraweb)

    Hi @mnroediger

    This is most likely a PHP issue indeed. You’ll probably need to define the variables you’re trying to use in your code.

    In any case, this are general PHP code errors and therefore not related to Pods for support. You will definitely find your answers online if you search for these errors on sites like Stackoverflow. The proper development software (any IDE) would also find these errors for you.

    Happy coding! Jory

    Thread Starter mnroediger

    (@mnroediger)

    ok thanks!

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Unsupported operand types’ is closed to new replies.