i am not tring to do anything. i just updated the php version from server from 5.6 to 7.4 and the wp version. after 5 years. i didnt saw it at first... and i dont no what to do it only afects the editable functions of the teme...

    The Dine and Drink theme is no longer available through ThemeForest, although is does still appear to be available from some other places. WordPress is not the most reliable ecosystem to begin with, so there are a couple questions - is the theme still under active development, and if it is have you updated it as well? The errors all stem from the theme, so if it has updates, update it. If not, either revert your other updates or find another theme because it's clearly not compatible with modern php/WordPress.

      unfortunetly the theme is no longer available anywere they all redirect you to themeforest... so i dont`t have the posibility to update it 🙁

        i now may know what the problem is, 1 mounth ago i had a little erorr at a row an i read in internet and the situason was soving by bloking (add //) a row and that was the row 100 from the picture but no i dont know what file was that. does any one now what file is that and where is located?
        Thanks

        [upl-image-preview url=https://board.phpbuilder.com/assets/files/2020-05-28/1590647924-481628-fisier.bmp]

          So I followed up that link and instead of returning an XML file containing a version number, it's now returning a URL-squatter's page. Someone didn't renew their "andthemes.com" domain registration and now some rando is sitting on it hoping someone else will be interesting in buying it.

          So I can answer the questions @maxxd asked above: no, development of the theme is dead and the site that hosted it is dead as well. If you've still got the theme and you can figure out what version it has, and if you want to keep the theme, somewhere in it there's code that uses the XML document returned get_latest_theme_version and uses that to decide ... something, I guess whether to download the new version. That code needs to be replaced so that it neither bothers to check nor tries to update.

            As a quick fix, try this - log in to the admin section of your site and go to /wp-admin/options.php. You'll find a list of options and their values - search for 'contempo-notifier-cache'. It should contain some XML, including a version number. Copy that text and put this after the line function get_latest_theme_version($interval) {

                return "{paste the 'contempo-notifier-cache' value here}";

            Hopefully it goes without saying that you'll have to replace everything in quotes with the value in the 'contempo-notifier-cache' options field. Even then, I can't guarantee that'll work, but it looks like it should at least send back the same version number you currently have, hopefully fooling the theme into thinking it's completely up to date.

            Meanwhile, find another theme. Even without looking at it I can almost guarantee there are security holes in there.

              i have searched the 'contempo-notifier-cache' in options.php but with no luck. i have found the file was update_notifier.php but with no luck if i deccoment the //$xml = simplexml_load_string($notifier_data); i have lot more erorr

                and i have this : "function get_latest_theme_version($interval) {" in update_notifier.php if helps?

                  update_option and get_option write to and read from the options table, and both pass $db_cache_field which equates to 'contempo-notifier-cache', which leads me to believe that the value does exist somewhere in the options table. It should be listed on the options.php page, but it's possible something has changed since I last used WordPress - try looking in the database itself.

                  maxxd
                  Further, there's also the contemp-notifier-last-updated field. Finding at setting that to something WAY in the future (like December 2500) would prevent this function from thinking that the theme needed updating.

                  The code suggests that the date is being stored in there as a Unix timestamp (instead of as a date), Depending on the type used the latest date possible might be 4294967295 (February 2106) or 214748364 (January 2038).

                  The simple_xml_load_string line will be needed, because a text string is being stored, and the caller of this function will be expecting is XML.

                  Weedpacket setting that to something WAY in the future (like December 2500) would prevent this function from thinking that the theme needed updating.

                  True - hadn't thought about that!

                  Weedpacket The simple_xml_load_string line will be needed, because a text string is being stored, and the caller of this function will be expecting is XML.

                  Also true. However, given that it's an XML string being returned and not just a date I wonder if there are any other functions that rely on that XML string - it's possible there's another value in there that's checked elsewhere.

                  maxxd Also true. However, given that it's an XML string being returned and not just a date I wonder if there are any other functions that rely on that XML string - it's possible there's another value in there that's checked elsewhere.

                  Agreed. This function does a lot of work to give the user something they already have, just in case something that is now impossible happens. As you suggest, it might as well just return the thing right from the start.

                    I have found in update_notifier.php this:

                    $db_cache_field = 'contempo-notifier-cache';
                    $db_cache_field_last_updated = 'contempo-notifier-last-updated';

                    in options.php no contempo

                    andreinnica I have found in update_notifier.php this:

                    $db_cache_field = 'contempo-notifier-cache';
                    $db_cache_field_last_updated = 'contempo-notifier-last-updated';

                    in options.php no contempo

                    Sorry, but I'm not really sure what that means. We already knew what update-notifier.php contained - are you saying that if you search for 'contempo' on the 'options.php' page there are no matches? Or there are matches but the value of the keys is unreadable? Either way, have you checked the database itself - it's possible to hide values from 'options.php' that are contained in the options table of the database.

                    Presumably, the relevant database table is named somewhere (the place to start looking is in the definition of the get_option() function); it's in that table the contempo-notifier-cache and contempo-notifier-last-updated columns will be found. (I'm kinda worried the naming convention suggests the table is named contempo or even contempo-notifier.)

                      get_option() simply grabs the record from table wp_options where option_name matches the supplied string - in this case, contempo-notifier-last-updated and contemp-notifier-cache. @andreinnica - in your database, run this:

                      SELECT *
                      FROM wp_options
                      WHERE option_name = 'contempo_notifier_cache';

                      Having said that. let me reiterate that at this point it's a better idea to simply find and implement a new theme - this one is no longer under active development and as such is a security risk. Depending on when it was written, it's possible that it's a massive security risk.

                      4 days later

                      maxxd exactley they are no matches when i search for 'contempo' on the 'options.php' page

                        andreinnica

                        It would run anywhere in the database, or (from your perspective) it would run in whatever it is you use to manage the database.

                          Actually, it might be better to run

                          SELECT *
                          FROM wp_options
                          WHERE option_name LIKE '%contempo_notifier_cache%';

                          If my memory serves correctly, the way to hide an option from displaying to the system is to prepend the name with an underscore, though admittedly it's been a while since I've been in the WordPress ecosystem with any regularity.

                            Write a Reply...