outdoorsdev1
Forum Replies Created
-
Forum: Plugins
In reply to: [Plugin Organizer] PHP 8.3 warnings/deprecationsHope this helps ??
Forum: Plugins
In reply to: [WordPress REST API Authentication] Can’t update widgetsHi, is there any update to this?
Forum: Plugins
In reply to: [WordPress REST API Authentication] Can’t update widgetsAlso, when deactivating the plugin and asked for feedback, the Skip button doesn’t skip past giving feedback and de-activate.
This means users HAVE to give their info when de-activating, which violates WordPress policies and the GDPR.
This works but I don’t want to click to remove it once every 7 days. I don’t need the stats, and if I do you could let me toggle them on or off in settings.
Otherwise, this is essentially just an ad for possibly upgrading.
Forum: Plugins
In reply to: [WordPress REST API Authentication] 401 accessing REST API since 3.5/3.51Seems to have worked now, thanks for fixing the issues ??
Forum: Plugins
In reply to: [WordPress REST API Authentication] 401 accessing REST API since 3.5/3.51Card is an ACF endpoint for a custom post type card, which has custom fields attached. Both are exposed to the API.
Reverting does fix the issue. Tested with the latest and previous versions of ACF.
ACF fields are stored as a subfield in post meta fields I believe. https://www.advancedcustomfields.com/resources/wp-rest-api-integration/
Forum: Plugins
In reply to: [WordPress REST API Authentication] 401 accessing REST API since 3.5/3.51# Upload the image
try:
image_response = requests.post(media_endpoint, headers=image_headers, data=image_data, verify=verify_ssl)
image_response.raise_for_status()
image_id = image_response.json()['id']
if verbose:
print(f"Image uploaded successfully for {card_info['card_title']}. Image ID: {image_id}")
# Set the uploaded image as the featured image of the post
post_update_data = {
'featured_media': image_id
}
try:
update_response = requests.post(f"{card_endpoint}/{card_info['post_id']}", headers=headers, json=post_update_data, verify=verify_ssl)
update_response.raise_for_status()
if verbose:
print(f"Image set as featured for {card_info['card_title']} with ID {image_id} for post ID {card_info['post_id']}.")
except requests.exceptions.HTTPError as http_err:
if update_response.status_code == 403:
print("Permission denied. You are not allowed to use this endpoint or the provided data is not allowed.")
elif update_response.status_code == 404:
print("Endpoint not found. Please check the URL.")
else:
print(f"HTTP error occurred while setting featured image: {http_err}")
except requests.exceptions.ConnectionError:
print("Connection error while setting featured image. Check your internet connection and WordPress URL.")
except requests.exceptions.Timeout:
print("Request timed out while setting featured image. The server might be slow or unresponsive.")
except requests.exceptions.RequestException as err:
print(f"An error occurred while setting featured image: {err}")Some example code. This is after checking and verifying I can get tokens, and they are up to date.
In this case i’m seeing the errors below: –
HTTP error occurred while setting featured image: 401 Client Error: Unauthorized for url: https://mysite.com/wp-json/wp/v2/card/12767
HTTP error occurred: 401 Client Error: Unauthorized for url: https://mysite.com/wp-json/wp/v2/media/12768
which indicate we can access the site and upload images, but a 401 error is coming back while trying to set the featured image. i’ve checked with various other test scripts and i’m able to authenticate fine.- This reply was modified 5 months, 1 week ago by outdoorsdev1.
Thanks!
Forum: Plugins
In reply to: [Simplelightbox] LegacyNo, I was saying that the legacy script always loads – even if I haven’t selected to use the legacy version. If I force the legacy script not to load on a page/post, lightbox doesn’t seem to work at all.
Forum: Plugins
In reply to: [Simplelightbox] LegacyIf I deload the legacy script, the whole plugin seems to not work. I’m on the latest firefox
Forum: Plugins
In reply to: [Simplelightbox] Additional Selectors doesn’t work?Thanks!
This worked for me, the immediate last version is fine.
Additionally as a seperate issue the simple-lightbox.legacy.min.js file is loading instead of the standard js script, even though I don’t have legacy selected in the options.
I totally get the viewpoint, however this was the easiest way to store data and display it. I can probably rewrite my functions to look through an array instead of fields one by one.
If I wanted to store multiple values in one field would you suggest checkbox/select instead? I’d be adding new values to choose from fairly regularly.
Also, is is possible to collapse/hide filters on desktop?
Also, is it possible to collapse the filters like the “Collapse Filters Widget on Mobile devices” does on all devices?
Forum: Plugins
In reply to: [Lightbox for Gallery & Image Block] custom post type and generatepress blockWhen inspecting on this page https://pastebin.com/gWT6ZeCE
it looks like there is a javascript error in the console when clicking the image
Uncaught TypeError: Node.removeChild: Argument 1 is not an object.
There are a couple of posts on the homepage you can check out that seem to be fine.
Forum: Plugins
In reply to: [Lightbox for Gallery & Image Block] custom post type and generatepress blockThat doesn’t seem to have changed anything. The post does pull from an element within generatepress if that makes a difference, maybe the element (a content template) needs to be referenced too?