Closed sanjom closed 8 years ago
Same Problem here
Same here as well. I guess a check for
&& method_exists(wire('pages')->get($itemID)->title, 'getLanguageValue')
should be included in the if condition in line 1750, as getLanguageValue seem to be unavailable if there's only one language configured. Alternatively, a
&& wire('languages')->count() > 1
should do the same.
Thus, the line should look like in 1750 or?
if($language != null) $itemTitle = wire('pages')->get($itemID)->title->getLanguageValue($language) && method_exists(wire('pages')->get($itemID)->title, 'getLanguageValue'); //title of each PW page in this array
Sorry I'm no developer?
Without looking at the code (I'm on my phone), I think BitPoet meant something like this:
if($language != null && method_exists(wire('pages')->get($itemID)->title, 'getLanguageValue')) $itemTitle = wire('pages')->get($itemID)->title->getLanguageValue($language); //title of each PW page in this array
Yes, thanks sanjom, that's what I meant. To be sure, I just tested it with LanguageSupport installed and uninstalled, and it worked perfectly both times.
Sweet, how do we go about changing that in the official code?
I've submitted a pull request with the fix. Meanwhile, you can snatch the zip file from my development fork
Accepted @BitPoet's PR (4d1b015493c54aa60aeda8c22295ac0a909e9afe). This is now fixed and available in version 011 (master and dev), thanks all.
When a page is added to the menu (via ASM-select, I haven't tried autocomplete) this error is thrown:
This error occurs under the following conditions:
The second point is where the error lies, I think. I have used the multilingual profile but because I will not need the additional languages for the moment, I have deleted all but the default. When I add another language, this error disappears.
My current workaround is to just comment out the if statement on that line and only use the code in the else statement.
PS: this issue is slightly different to Issue #22.