Spidergirl1979
Forum Replies Created
-
Forum: Plugins
In reply to: [Enhanced Media Library] Not saving on WP 5.0Are you by chance running Advanced Custom Fields? I did some testing and it looks as though the media category DOES get saved in the database, it’s just not checking the boxes at all. When I turned off my ACF plugin it worked. I’m going to keep digging into this cause turning off ACF isn’t an option for me.
Forum: Plugins
In reply to: [Enhanced Media Library] Not saving on WP 5.0I’m having this same issue as well. I’m not *the* developer, but I am a developer and I’m trying to debug it. For testing I set up a brand new WP site with this plugin and oddly enough it did save the media category. I haven’t delved too much into it, but I’m half wondering if there’s some interference with another plugin I have.
This isn’t an official response lol, but I had the same issue and found a fix:
After the line
add_action('save_post','expirationdate_update_post_meta');
add in
add_action('edit_attachment','expirationdate_update_post_meta');
Hope this helps!
I just actually figured it out. ?? I added
add_action('edit_attachment','expirationdate_update_post_meta');
after the lineadd_action('save_post','expirationdate_update_post_meta');
and it worked.Could this be added into a future release?
Oh man, I’m sorry! I had two custom views and got them mixed up. Let’s try this again. ??
The generated SQL was this:
CREATE ALGORITHM=UNDEFINED DEFINER=
cpses_jlzSPmfEaQ
@localhost
SQL SECURITY DEFINER VIEWwp_terms_v
AS selecttr
.object_id
ASobject_id
,tr
.term_order
ASterm_order
,tr
.term_taxonomy_id
ASterm_taxonomy_id
,tt
.term_id
ASterm_id
,tt
.taxonomy
AStaxonomy
,tt
.parent
ASparent
,tt
.description
ASdescription
,tt
.count
AScount
,t
.name
ASname
,t
.slug
ASslug
,t
.term_group
ASterm_group
from ((wp_term_relationships
tr
joinwp_term_taxonomy
tt
on((tr
.term_taxonomy_id
=tt
.term_taxonomy_id
))) joinwp_terms
t
on((t
.term_id
=tt
.term_id
))) ;and what I changed it to was this:
CREATE VIEW
wp_terms_v
AS selecttr
.object_id
ASobject_id
,tr
.term_order
ASterm_order
,tr
.term_taxonomy_id
ASterm_taxonomy_id
,tt
.term_id
ASterm_id
,tt
.taxonomy
AStaxonomy
,tt
.parent
ASparent
,tt
.description
ASdescription
,tt
.count
AScount
,t
.name
ASname
,t
.slug
ASslug
,t
.term_group
ASterm_group
from ((wp_term_relationships
tr
joinwp_term_taxonomy
tt
on((tr
.term_taxonomy_id
=tt
.term_taxonomy_id
))) joinwp_terms
t
on((t
.term_id
=tt
.term_id
))) ;Sure thing. The generated SQL was this:
CREATE ALGORITHM=UNDEFINED DEFINER=
cpses_jlzSPmfEaQ
@localhost
SQL SECURITY DEFINER VIEWwp_terms_v
AS selecttr
.object_id
ASobject_id
,tr
.term_order
ASterm_order
,tr
.term_taxonomy_id
ASterm_taxonomy_id
,tt
.term_id
ASterm_id
,tt
.taxonomy
AStaxonomy
,tt
.parent
ASparent
,tt
.description
ASdescription
,tt
.count
AScount
,t
.name
ASname
,t
.slug
ASslug
,t
.term_group
ASterm_group
from ((wp_term_relationships
tr
joinwp_term_taxonomy
tt
on((tr
.term_taxonomy_id
=tt
.term_taxonomy_id
))) joinwp_terms
t
on((t
.term_id
=tt
.term_id
))) ;and what I changed it to was this:
CREATE VIEW
wp_active_posts_v
AS selectwp_posts
.ID
ASID
from (wp_posts
left joinwp_posts
p2
on((wp_posts
.post_parent
=p2
.ID
))) where (((wp_posts
.post_status
<> ‘trash’) and (wp_posts
.post_status
<> ‘auto-draft’)) or ((wp_posts
.post_status
= ‘inherit’) and (p2
.post_status
<> ‘trash’) and (p2
.post_status
<> ‘auto-draft’))) group bywp_posts
.ID
;- This reply was modified 7 years, 11 months ago by Spidergirl1979.
Forum: Plugins
In reply to: [Conditional Widgets] Shows all elements in attachment.phpThis problem reared its head again and I initially forgot I put in a post on this forum ??
I went in and actually added support for the attachment pages. Only needed like a half dozen lines of code. I updated logic.php, form.php and cets_conditional_widgets.php Any of the new code I put in has a NEW beside it so it’ll be easy to find. The updated files are here if you wish to add them to a future release:
https://jlmconsulting.ca/wp-content/uploads/2017/01/ConditionalWidgetsAttachmentUpdate.zipI’m currently using WordPress 4.7.2 and it works properly.
If you have any questions or need any help, please feel free to give me a shout! Thanks again!
Forum: Fixing WordPress
In reply to: Updating Post Type and Changing PermalinksThanks so much! This got me on the right track. What I ended up doing was updating the database with SQL and using a redirect plugin I already had on the site.
The site is on a windows server and uses IIS so the .htaccess wouldn’t have done much for me. Before changing my permalinks, I set the write access to the web.config so WP could make its changes. I updated the permalinks and then took the write access off the web.config.
I used the following to update the guid, the post type
update wp_posts set post_type='post',guid=replace(guid,'post_type=service&','') where post_type='service'
The following was used to manually insert the old urls and the new urls into the redirect table (it’s a bit of a doozy)
insert into wp_redirection_items (url,regex,last_count,last_access,group_id,status,action_type,action_code,action_data,match_type) select concat('/?service=',post_name) as url,0 as regex,0 as last_count,NOW() as last_access,1 as group_id,'enabled' as status,'url' as action_type,301 as action_code, concat('/',(select c.slug from wp_term_relationships a inner join wp_term_taxonomy b on a.term_taxonomy_id=b.term_taxonomy_id inner join wp_terms c on b.term_id=c.term_id where object_id=aa.id and b.taxonomy='category' limit 1),'/', post_name) as action_data,'url' as match_type from wp_posts aa where post_type="service";
I still have to update a few other things like my menu items, quicklinks etc… but I think the bulk of the work is done. And the tests I’ve done in dev look like it worked.