AdvancedCustomFields / AdvancedCustomFields/acf

$sitepress->get_setting() not available in very old version of WPML

Open
#69 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
PHP
Stars
945
Forks
197
PR merge metrics
No merged PRs in 30d

Description

https://github.com/AdvancedCustomFields/acf/blob/a0c931588e7ed60b09f566249d820ab055fb89a2/includes/wpml.php#L71

WPML used to offer free versions which cannot be live-updated. With those versions (I have 2.6.x installed), $sitepress->get_setting() causes the site to crash due to "method undefined" error.

How about returning false for is_translatable() if the method $sitepress->get_setting() does not exist?

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start in includes/wpml.php at line 71, where $sitepress->get_setting() is called. Check how is_translatable() handles the WPML integration, then verify that installations lacking get_setting() no longer crash and return false instead. The issue does not mention a test file.

Written by the indexing model from the issue text.

Assessment

Tech stack
php
Domain
backend
Issue type
Bug
Difficulty
2/5
Estimated time
1-3 hours
Activity status
Stale
Clarity
Clearly specified
Newbie friendliness
55/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.