Error updating a collection
-
Hi,
suddenly I got this error in LR when I was trying to update a collectionIt was not possible to update the collection.
An internal error has occurred: bad argument #1 to ‘?’ (string expected, got nil)Any solution?
/per
-
They must have PHP Error Logs… Without them, we can spend days trying to find the issues without finding it.
The only way is to disable everything, maybe even the WP/LR Sync extensions if you are using them.
Last resort: move to a new hosting service with PHP Error Logs and a real support service. Not providing the PHP Error Logs is a huge issue.
BTW, I’m having the same issue and around the same time. Just now starting to troubleshoot. I’ve not asked for the PHP logs yet.Troubleshot the same as ptg1947.
TK
PHP error logs were not setup. I turned them on this morning at 8AM my time and I’ve repeatedly tried to sync and I get the same error “An internal error has occurred: bad argument #1 to ‘?’ (string expected, got nil)”. Interestingly enough, I can create another collection and it syncs but no photos sync. Does that help diagnose? I’ll keep watching the PHP error log.
BTW, I failed to mention that no entries were made in the error log.
One more thing. I decided to setup another user with admin rights and I get the following error in the LR Plugin when I change the login information to the new user: “Wrong login, password, or missing the rights to upload files.”. Where are the rights to upload files held? Maybe that’s the issue.
@tkahler Yes, that’s weird you got this message. Make sure your PHP Error Logs are actually working, it’s odd that it is empty. Make sure you are using the right URL, with http OR https included. Basically, it is very important to go through every point of the debugging page of WP/LR Sync. “An internal error has occurred: bad argument #1 to ‘?’” doesn’t mean much, only that the server doesn’t reply anything (which means that something was written in the PHP Error Logs).
OK. My PHP logs seem to be working. I turned on Debug and I got some debug information. Turned it off, tried to sync and got the error. I disabled all of my plugins and the error changed to “Wrong login, password, or missing the rights to upload files.”. I double-checked my login and it’s legit. I quit Lr and then restarted and the original error returned. No PHP errors were logged.
I setup php error login two ways. First, I set it up using the following code in wp-config.ini:
// log php errors
@ini_set(‘log_errors’,’On’); // enable or disable php error logging (use ‘On’ or ‘Off’)
@ini_set(‘display_errors’,’Off’); // enable or disable public display of errors (use ‘On’ or ‘Off’)
@ini_set(‘error_log’,’/home/path/logs/php-errors.log’); // path to server-writable log fileI created a blank php-errors.log in the wordpress root directory of my site.
Second, I enabled the php.ini in my root directory (one up from my wordpress directory. It has the following code:
;;; log php errors
display_startup_errors = false
display_errors = false
html_errors = false
log_errors = true
track_errors = true
error_log = /home/path/logs/php-errors.log
error_reporting = E_ALL | E_STRICT
log_errors_max_len = 0I have a separate php-errors.log in the same directory as the php.ini.
I checked my WPLRSync.log error log in my documents folder and it did log some entries:
2017-12-24 18:07:49 +0000, ERROR Response: “Error Domain=NSXMLParserErrorDomain Code=73 \”Line 3: Specification mandates value for attribute itemscope\nLine 3: attributes construct error\nLine 3: Couldn’t find end of Start Tag head\n\” UserInfo={NSLocalizedDescription=Line 3: Specification mandates value for attribute itemscope\nLine 3: attributes construct error\nLine 3: Couldn’t find end of Start Tag head\n}”
2017-12-24 18:07:49 +0000, ERROR Not XML? Body dump follows…
2017-12-24 18:07:49 +0000, ERROR Body is empty. PHP Error Logs on the server must be checked.
2017-12-24 18:07:49 +0000, ERRORSeems to be something amiss with the user file in WordPress but can’t figure out what it could be.
Again, no PHP errors on either log file.
Thoughts?
As an FYI. I use the LR/Blog lightroom plugin to build a blog post and it works fine.
LR/Blog is much simpler, so it’s not surprising it works. WP/LR Sync has much more complexity and an API that is sometimes used by other plugins, or by the extensions.
“Body is empty” really means that the problem happened on the server-side and it should have a PHP log, so that’s weird you don’t have it.
Also, if your install never ever changed and this problem just started to appear out of nowhere, it might be that the hosting service is cutting those requests. But only they would know. You could try to ask them, maybe there is something we could learn.
Please contact me here, I will have a closer look: meowapps.com/contact. But now it’s holidays so I really can’t reply fast ??
I do have the exact same error. PHP error logging enabled, but no logs errors show up in log file. I have a local WP installation on my NAS inside a docker container, so I am able to verify that the rest is working fine. One addition though, my WPLR Sync plugin in Lr shows version 2.8.0.2800. Is this the latest one? Could that be the source of the error? Interestingly I also don’t even need to publish to get the error. Simply logging out in Lr and trying to login again, shows the error in the Lr app. No errors logged on the WP side though. Thoughts?
The new version might work better, indeed, but I can’t really guarantee it neither. Actually, the old versions has been working for a long time without any issue, otherwise, I would have fixed them. The issues are always related to connectivity issues, by other plugins, security plugins, servers refusing connections, etc. Are you sure your error logs are working? If you generate a PHP error, is it logged?
Did you really go through EVERY point of the debugging page? https://meowapps.com/wplr-sync/debug-connectivity/
Yes, I went through every step in the manual you mentioned above. It might be that the issue is related to the latest WP update 4.9.1. I believe everything worked before, and to your point about connectivity, I haven’t changed anything in the setup other than updating to WP 4.9.1.
Another indicator that the basic connectivity works is that can create new collections in LR and publish them without images. Those collections are then visible in WP galleries. But as soon as I try to either :
1. Logout and Login again into the WPLR Sync server from the Lr plugin
2. Try to publish images into a collectionI get the above mentioned error. Whenever this error occurs I don’t see any error in any debug or error log in WP that I have setup. I do see other PHP errors though when I force them to occur.
@frsoeteb Did you check your PHP Error Logs? If you checked, and it is empty, can you do as mentioned in my article: https://meowapps.com/wplr-sync/debug-connectivity/ and make sure it actually works? It’s impossible to guess what the problem is if we have nothing, unfortunately. The plugin works perfectly with the latest version and I am pretty sure something else is happening.
Hi, I just ran the commands with Charles Proxy on the client and I do see that the userinfo API call that I expected to fail actually works and returns correct information with an OK HTTP code of 200. The information looks like the following in JSON format:
{
“ID”: “1”,
“user_login”: “my login name”,
“user_pass”: “passphrase”,
.
.
“user_activation_key”: “”,
.
.
.
}Right after that call I do see the LR plugin making a call to your sales server for validating the license key I assume. the URL is https://apps.meow.fr/xmlrpc.php. But here the error code is 301 , moved permanently. After that another call is made to https://photos.meow.fr/xmlrpc.php which returns 404 not found. Is it possible that those sequences are the problem? Have you changed / moved your license check servers?
- The topic ‘Error updating a collection’ is closed to new replies.