wordpress-premium / wordpress-seo-premium

This is a mirrored repository containing the latest version of Yoast SEO Premium. You can find the main repository on https://gitlab.com/wpseo-premium. Completely free of malware and ads. Download as .zip archive or clone the repository and have fun. Don't forget to purchase a license if you like the plugin.
Other
34 stars 13 forks source link

Warning: Undefined property #4

Open mtdas99 opened 1 month ago

mtdas99 commented 1 month ago

PHP errors logged as below. The errors comes from Yoast SEO WordPress repository version while this Yoast SEO Premium 22.5 version activated.

Warning: Undefined property:: stdClass::$url in /home/u788773049/domains/questopedia.com/public_html/wp-content/plugins/wordpress-seo/inc/class-addon-manager.php on line 819

Warning: Undefined property: stdClass::$renewalUrl in /home/u788773049/domains/questopedia.com/public_html/wp-content/plugins/wordpress-seo/inc/class-addon-manager.php on line 834

Warning: Undefined property: stdClass::$version in /home/u788773049/domains/questopedia.com/public_html/wp-content/plugins/wordpress-seo/inc/class-addon-manager.php on line 837

Warning: Undefined property: stdClass::$name in /home/u788773049/domains/questopedia.com/public_html/wp-content/plugins/wordpress-seo/inc/class-addon-manager.php on line 838

Warning: Undefined property: stdClass::$lastUpdated in /home/u788773049/domains/questopedia.com/public_html/wp-content/plugins/wordpress-seo/inc/class-addon-manager.php on line 840

Warning: Undefined property: stdClass::$storeUrl in /home/u788773049/domains/questopedia.com/public_html/wp-content/plugins/wordpress-seo/inc/class-addon-manager.php on line 841

Warning: Undefined property: stdClass::$changelog in /home/u788773049/domains/questopedia.com/public_html/wp-content/plugins/wordpress-seo/inc/class-addon-manager.php on line 844

Warning: Undefined property: stdClass::$renewalUrl in /home/u788773049/domains/questopedia.com/public_html/wp-content/plugins/wordpress-seo/inc/class-addon-manager.php on line 834

Warning: Undefined property: stdClass::$version in /home/u788773049/domains/questopedia.com/public_html/wp-content/plugins/wordpress-seo/inc/class-addon-manager.php on line 837

Warning: Undefined property: stdClass::$name in /home/u788773049/domains/questopedia.com/public_html/wp-content/plugins/wordpress-seo/inc/class-addon-manager.php on line 838

Warning: Undefined property: stdClass::$lastUpdated in /home/u788773049/domains/questopedia.com/public_html/wp-content/plugins/wordpress-seo/inc/class-addon-manager.php on line 840

Warning: Undefined property: stdClass::$storeUrl in /home/u788773049/domains/questopedia.com/public_html/wp-content/plugins/wordpress-seo/inc/class-addon-manager.php on line 841

Warning: Undefined property: stdClass::$changelog in /home/u788773049/domains/questopedia.com/public_html/wp-content/plugins/wordpress-seo/inc/class-addon-manager.php on line 844

Warning: Undefined property: stdClass::$renewalUrl in /home/u788773049/domains/questopedia.com/public_html/wp-content/plugins/wordpress-seo/inc/class-addon-manager.php on line 834

Warning: Undefined property: stdClass::$version in /home/u788773049/domains/questopedia.com/public_html/wp-content/plugins/wordpress-seo/inc/class-addon-manager.php on line 837

Warning: Undefined property: stdClass::$name in /home/u788773049/domains/questopedia.com/public_html/wp-content/plugins/wordpress-seo/inc/class-addon-manager.php on line 838

Warning: Undefined property: stdClass::$lastUpdated in /home/u788773049/domains/questopedia.com/public_html/wp-content/plugins/wordpress-seo/inc/class-addon-manager.php on line 840

Warning: Undefined property: stdClass::$storeUrl in /home/u788773049/domains/questopedia.com/public_html/wp-content/plugins/wordpress-seo/inc/class-addon-manager.php on line 841

Warning: Undefined property: stdClass::$changelog in /home/u788773049/domains/questopedia.com/public_html/wp-content/plugins/wordpress-seo/inc/class-addon-manager.php on line 844

Warning: Undefined property: stdClass::$renewalUrl in /home/u788773049/domains/questopedia.com/public_html/wp-content/plugins/wordpress-seo/inc/class-addon-manager.php on line 834

Warning: Undefined property: stdClass::$version in /home/u788773049/domains/questopedia.com/public_html/wp-content/plugins/wordpress-seo/inc/class-addon-manager.php on line 837

Warning: Undefined property: stdClass::$name in /home/u788773049/domains/questopedia.com/public_html/wp-content/plugins/wordpress-seo/inc/class-addon-manager.php on line 838

Warning: Undefined property: stdClass::$lastUpdated in /home/u788773049/domains/questopedia.com/public_html/wp-content/plugins/wordpress-seo/inc/class-addon-manager.php on line 840

Warning: Undefined property: stdClass::$storeUrl in /home/u788773049/domains/questopedia.com/public_html/wp-content/plugins/wordpress-seo/inc/class-addon-manager.php on line 841

Warning: Undefined property: stdClass::$changelog in /home/u788773049/domains/questopedia.com/public_html/wp-content/plugins/wordpress-seo/inc/class-addon-manager.php on line 844

Warning: Undefined property: stdClass::$renewalUrl in /home/u788773049/domains/questopedia.com/public_html/wp-content/plugins/wordpress-seo/inc/class-addon-manager.php on line 834

Warning: Undefined property: stdClass::$version in /home/u788773049/domains/questopedia.com/public_html/wp-content/plugins/wordpress-seo/inc/class-addon-manager.php on line 837

Warning: Undefined property: stdClass::$name in /home/u788773049/domains/questopedia.com/public_html/wp-content/plugins/wordpress-seo/inc/class-addon-manager.php on line 838

Warning: Undefined property: stdClass::$lastUpdated in /home/u788773049/domains/questopedia.com/public_html/wp-content/plugins/wordpress-seo/inc/class-addon-manager.php on line 840

Warning: Undefined property: stdClass::$storeUrl in /home/u788773049/domains/questopedia.com/public_html/wp-content/plugins/wordpress-seo/inc/class-addon-manager.php on line 841

Warning: Undefined property: stdClass::$changelog in /home/u788773049/domains/questopedia.com/public_html/wp-content/plugins/wordpress-seo/inc/class-addon-manager.php on line 844
thaikolja commented 4 weeks ago

Hi @mtdas99,

Thanks for bringing this to my attention.

[!WARNING]
I haven't yet had time to fix it properly, but if you need a quick and dirty fix, you must edit a few lines of the Yoast SEO plugin from the WordPress repository or simply download the edited version linked below. Of course, updating it will overwrite it, so consider this a very temporary solution or wait until I've found a more elegant solution that only affects the Premium repository here on GitHub.

This solution has been tested with the free Yoast WordPress SEO v23.4 and the updated version of Yoast WordPress SEO Premium v23.4 (the current release here is the outdated v22.5), which will be released once I've fixed these PHP warnings.

Temporary Fix

The new branch v23.4-temporary-fix contains the free plugin version of Yoast SEO. For transparency reasons, you can see the changes made here (disregard all the other changes; this is because this branch was created from v22.5, not the newest v23.4).

Download Temporary Fixed Plugin

If you're not depending on PHP Composer or other automatic package managers that are hooked up to this repository, you can download this adjusted .zip file and replace it with your current version of wordpress-seo (not the premium plugin):

Download Yoast SEO v23.4

Manually Implement Temporary Fix

If you choose to apply the "fix" manually, follow these steps:

  1. Open wp-content/plugins/wordpress-seo/inc/class-addon-manager.php

  2. Scroll to the function named map_site_information on row 817

  3. Change the line on 819 from

    'url' => $site_information->url,

    to

    'url' => $site_information->url ?? WPSEO_Utils::get_home_url(),
  4. Scroll down to the function map_subscription() on line 831 and replace the returning object between 833 and 846 from

return (object) [
  'renewal_url' => $subscription->renewalUrl,
  'expiry_date' => $subscription->expiryDate,
  'product' => (object) [
    'version' => $subscription->product->version,
    'name' => $subscription->product->name,
    'slug' => $subscription->product->slug,
    'last_updated' => $subscription->product->lastUpdated,
    'store_url' => $subscription->product->storeUrl,
    // Ternary operator is necessary because download can be undefined.
    'download' => $subscription->product->download ?? null,
    'changelog' => $subscription->product->changelog,
  ],
];

to

return (object) [
  'renewal_url' => $subscription->renewalUrl ?? null,
  'expiry_date' => $subscription->expiryDate,
  'product' => (object) [
    'version' => $subscription->product->version ?? '',
    'name' => $subscription->product->name ?? '',
    'slug' => $subscription->product->slug,
    'last_updated' => $subscription->product->lastUpdated ?? '',
    'store_url' => $subscription->product->storeUrl ?? '',
    // Ternary operator is necessary because download can be undefined.
    'download' => $subscription->product->download ?? null,
    'changelog' => $subscription->product->changelog ?? '',
  ],
];
  1. Save the file.

Again, this is a temporary fix. I'll have a look into it to fix it on the wordpress-seo-remium level and then overwrite the current release. I'll notify you once this is done so you and everyone else affected can replace their own version with the adjusted one.

thaikolja commented 3 weeks ago

This issue has now been fixed and is included in the latest v23.4 release inside the main branch.

mtdas99 commented 2 weeks ago

Previously I didn't saw any issues like below and also didn't saw any notification on plugin page to Activate your Subscription. But now the plugin shows the following error along with the notification:

Plugins-‹-SiteNest-Latest-News-Articles-—-WordPress-10-01-2024_12_41_PM

We have detected the following issues that affect the SEO of your site.

Yoast SEO Premium isn't working as expected and you are not receiving updates or support! Make sure to activate your product subscription in MyYoast to unlock all the features of Yoast SEO Premium.

thaikolja commented 2 weeks ago

@mtdas99 This is now fixed in the latest release of v23.5.

mtdas99 commented 2 weeks ago

Now whenever I try to Start SEO data optimization, Yoast is troughing the below mentioned error. I have deactivated all plugins including security plugin but still same.

Oops, something has gone wrong and we couldn't complete the optimization of your SEO data. Please click the button again to re-start the process. If the problem persists, please contact support.

Below are the technical details for the error. See this page for a more detailed explanation.

Error details Status code

thaikolja commented 2 weeks ago

@mtdas99 This seems to be an issue on your site. When I run the data optimization, it does so and responds with

We've successfully analyzed your site & optimized your SEO data!

Problems are also shown as (0).

If your issue still persists, please go to "Tools" -> "Site Health" -> "Info" and press the button "Copy site info to clipboard". Paste the results here using the code block format.

mtdas99 commented 1 week ago

Thank you for reply. Here are the Site Health info details:

### wp-core ###

version: 6.6.2
site_language: en_US
user_language: en_US
timezone: +00:00
permalink: /%postname%/
https_status: true
multisite: false
user_registration: 1
blog_public: 1
default_comment_status: open
environment_type: production
user_count: 8
dotorg_communication: true

### wp-paths-sizes ###

wordpress_path: /home/u788773049/domains/questopedia.com/public_html
wordpress_size: 74.72 MB (78349466 bytes)
uploads_path: /home/u788773049/domains/questopedia.com/public_html/wp-content/uploads
uploads_size: 106.71 MB (111890869 bytes)
themes_path: /home/u788773049/domains/questopedia.com/public_html/wp-content/themes
themes_size: 16.81 MB (17623329 bytes)
plugins_path: /home/u788773049/domains/questopedia.com/public_html/wp-content/plugins
plugins_size: 68.51 MB (71842824 bytes)
fonts_path: /home/u788773049/domains/questopedia.com/public_html/wp-content/uploads/fonts
fonts_size: directory not found
database_size: 19.17 MB (20103168 bytes)
total_size: 285.92 MB (299809656 bytes)

### wp-dropins (1) ###

object-cache.php: true

### wp-active-theme ###

name: Discy Child (discy-child-theme)
version: 1.0
author: 2codeThemes
author_website: https://2code.info
parent_theme: Discy (discy)
theme_features: core-block-patterns, widgets, menus, widgets-block-editor, automatic-feed-links, post-thumbnails, html5, title-tag
theme_path: /home/u788773049/domains/questopedia.com/public_html/wp-content/themes/discy-child-theme

### wp-parent-theme ###

name: Discy (discy)
version: 5.7.4
author: 2codeThemes
author_website: https://2code.info/
theme_path: /home/u788773049/domains/questopedia.com/public_html/wp-content/themes/discy

### wp-themes-inactive (1) ###

Twenty Twenty-Two: version: 1.8, author: the WordPress team

### wp-mu-plugins (1) ###

Disable Auto Updates: author: (undefined), version: (undefined)

### wp-plugins-active (12) ###

Akismet Anti-spam: Spam Protection: version: 5.3.3, author: Automattic - Anti-spam Team
Contact Form 7: version: 5.9.8, author: Takayuki Miyoshi
Envato Market: version: 2.0.12, author: Envato
Highlighting Code Block: version: 2.0.1, author: LOOS, Inc.
LiteSpeed Cache: version: 6.5.1, author: LiteSpeed Technologies
Nextend Social Login: version: 3.1.14, author: Nextendweb
Post SMTP: version: 2.9.9, author: Post SMTP
Wordfence Security: version: 7.11.7, author: Wordfence
WPQA - The WordPress Questions And Answers Plugin: version: 6.1.4, author: 2code
Yoast SEO: version: 23.5, author: Team Yoast
Yoast SEO Premium: version: 23.5, author: Team Yoast
Yoast Test Helper: version: 1.18, author: Team Yoast

### wp-media ###

image_editor: WP_Image_Editor_Imagick
imagick_module_version: 1809
imagemagick_version: ImageMagick 7.1.1-19 Q16-HDRI x86_64 21601 https://imagemagick.org
imagick_version: 3.7.0
file_uploads: 1
post_max_size: 3072M
upload_max_filesize: 3072M
max_effective_size: 3 GB
max_file_uploads: 20
imagick_limits: 
    imagick::RESOURCETYPE_AREA: 2 TB
    imagick::RESOURCETYPE_DISK: 9.2233720368548E+18
    imagick::RESOURCETYPE_FILE: 393216
    imagick::RESOURCETYPE_MAP: 1,006 GB
    imagick::RESOURCETYPE_MEMORY: 503 GB
    imagick::RESOURCETYPE_THREAD: 1
    imagick::RESOURCETYPE_TIME: 9.2233720368548E+18
imagemagick_file_formats: 3FR, 3G2, 3GP, A, AAI, AI, APNG, ART, ARW, ASHLAR, AVI, AVIF, AVS, B, BAYER, BAYERA, BGR, BGRA, BGRO, BIE, BMP, BMP2, BMP3, BRF, C, CAL, CALS, CANVAS, CAPTION, CIN, CIP, CLIP, CMYK, CMYKA, CR2, CR3, CRW, CUBE, CUR, CUT, DATA, DCM, DCR, DCRAW, DCX, DDS, DFONT, DNG, DOT, DPX, DXT1, DXT5, EPDF, EPI, EPS, EPS2, EPS3, EPSF, EPSI, EPT, EPT2, EPT3, ERF, EXR, FARBFELD, FAX, FF, FILE, FITS, FL32, FLV, FRACTAL, FTP, FTS, FTXT, G, G3, G4, GIF, GIF87, GRADIENT, GRAY, GRAYA, GROUP4, GV, HALD, HDR, HEIC, HEIF, HISTOGRAM, HRZ, HTM, HTML, HTTP, HTTPS, ICB, ICO, ICON, IIQ, INFO, INLINE, IPL, ISOBRL, ISOBRL6, J2C, J2K, JBG, JBIG, JNG, JNX, JP2, JPC, JPE, JPEG, JPG, JPM, JPS, JPT, JSON, K, K25, KDC, LABEL, M, M2V, M4V, MAC, MAP, MASK, MAT, MATTE, MEF, MIFF, MKV, MNG, MONO, MOV, MP4, MPC, MPEG, MPG, MPO, MRW, MSL, MSVG, MTV, MVG, NEF, NRW, NULL, O, ORA, ORF, OTB, OTF, PAL, PALM, PAM, PANGO, PATTERN, PBM, PCD, PCDS, PCL, PCT, PCX, PDB, PDF, PDFA, PEF, PES, PFA, PFB, PFM, PGM, PGX, PHM, PICON, PICT, PIX, PJPEG, PLASMA, PNG, PNG00, PNG24, PNG32, PNG48, PNG64, PNG8, PNM, POCKETMOD, PPM, PS, PS2, PS3, PSB, PSD, PTIF, PWP, QOI, R, RADIAL-GRADIENT, RAF, RAS, RAW, RGB, RGB565, RGBA, RGBO, RGF, RLA, RLE, RMF, RSVG, RW2, SCR, SCREENSHOT, SCT, SFW, SGI, SHTML, SIX, SIXEL, SPARSE-COLOR, SR2, SRF, STEGANO, STRIMG, SUN, SVG, SVGZ, TEXT, TGA, THUMBNAIL, TIFF, TIFF64, TILE, TIM, TM2, TTC, TTF, TXT, UBRL, UBRL6, UIL, UYVY, VDA, VICAR, VID, VIFF, VIPS, VST, WBMP, WEBM, WEBP, WMF, WMV, WMZ, WPG, X, X3F, XBM, XC, XCF, XPM, XPS, XV, XWD, Y, YAML, YCbCr, YCbCrA, YUV
gd_version: 2.3.3
gd_formats: GIF, JPEG, PNG, WebP, BMP, AVIF, XPM
ghostscript_version: unknown

### wp-server ###

server_architecture: Linux 5.14.0-427.22.1.el9_4.x86_64 x86_64
httpd_software: LiteSpeed
php_version: 8.2.19 64bit
php_sapi: litespeed
max_input_variables: 5000
time_limit: 480
memory_limit: 3072M
max_input_time: 480
upload_max_filesize: 3072M
php_post_max_size: 3072M
curl_version: 7.76.1 OpenSSL/3.0.7
suhosin: false
imagick_availability: true
pretty_permalinks: true
htaccess_extra_rules: true
current: 2024-10-07T06:16:12+00:00
utc-time: Monday, 07-Oct-24 06:16:12 UTC
server-time: 2024-10-07T06:16:10+00:00

### wp-database ###

extension: mysqli
server_version: 10.11.9-MariaDB
client_version: mysqlnd 8.2.19
max_allowed_packet: 1073741824
max_connections: 2000

### wp-constants ###

WP_HOME: undefined
WP_SITEURL: undefined
WP_CONTENT_DIR: /home/u788773049/domains/questopedia.com/public_html/wp-content
WP_PLUGIN_DIR: /home/u788773049/domains/questopedia.com/public_html/wp-content/plugins
WP_MEMORY_LIMIT: 1064M
WP_MAX_MEMORY_LIMIT: 3072M
WP_DEBUG: false
WP_DEBUG_DISPLAY: true
WP_DEBUG_LOG: false
SCRIPT_DEBUG: false
WP_CACHE: true
CONCATENATE_SCRIPTS: undefined
COMPRESS_SCRIPTS: undefined
COMPRESS_CSS: undefined
WP_ENVIRONMENT_TYPE: Undefined
WP_DEVELOPMENT_MODE: undefined
DB_CHARSET: utf8
DB_COLLATE: undefined

### wp-filesystem ###

wordpress: writable
wp-content: writable
uploads: writable
plugins: writable
themes: writable
fonts: not writable
mu-plugins: writable
thaikolja commented 1 week ago

@mtdas99 Thanks for that, and for your patience. I'm going to inspect it tomorrow (Tuesday) and see what I can find. In the meantime, please create a full backup of your website so that, if we make changes, you can always restore them. A great plugin for that is Solid Backups, also hosted on WordPress Premium.