Forum Replies Created

Viewing 8 replies - 1 through 8 (of 8 total)
  • Are 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.

    I’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!

    Thread Starter Spidergirl1979

    (@spidergirl1979)

    I just actually figured it out. ?? I added
    add_action('edit_attachment','expirationdate_update_post_meta'); after the line add_action('save_post','expirationdate_update_post_meta'); and it worked.

    Could this be added into a future release?

    Thread Starter Spidergirl1979

    (@spidergirl1979)

    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 VIEW wp_terms_v AS select tr.object_id AS object_id,tr.term_order AS term_order,tr.term_taxonomy_id AS term_taxonomy_id,tt.term_id AS term_id,tt.taxonomy AS taxonomy,tt.parent AS parent,tt.description AS description,tt.count AS count,t.name AS name,t.slug AS slug,t.term_group AS term_group from ((wp_term_relationships tr join wp_term_taxonomy tt on((tr.term_taxonomy_id = tt.term_taxonomy_id))) join wp_terms t on((t.term_id = tt.term_id))) ;

    and what I changed it to was this:

    CREATE VIEW wp_terms_v AS select tr.object_id AS object_id,tr.term_order AS term_order,tr.term_taxonomy_id AS term_taxonomy_id,tt.term_id AS term_id,tt.taxonomy AS taxonomy,tt.parent AS parent,tt.description AS description,tt.count AS count,t.name AS name,t.slug AS slug,t.term_group AS term_group from ((wp_term_relationships tr join wp_term_taxonomy tt on((tr.term_taxonomy_id = tt.term_taxonomy_id))) join wp_terms t on((t.term_id = tt.term_id))) ;

    Thread Starter Spidergirl1979

    (@spidergirl1979)

    Sure thing. The generated SQL was this:

    CREATE ALGORITHM=UNDEFINED DEFINER=cpses_jlzSPmfEaQ@localhostSQL SECURITY DEFINER VIEWwp_terms_vAS selecttr.object_idASobject_id,tr.term_orderASterm_order,tr.term_taxonomy_idASterm_taxonomy_id,tt.term_idASterm_id,tt.taxonomyAStaxonomy,tt.parentASparent,tt.descriptionASdescription,tt.countAScount,t.nameASname,t.slugASslug,t.term_groupASterm_groupfrom ((wp_term_relationshipstrjoinwp_term_taxonomytton((tr.term_taxonomy_id=tt.term_taxonomy_id))) joinwp_termston((t.term_id=tt.term_id))) ;

    and what I changed it to was this:

    CREATE VIEWwp_active_posts_vAS selectwp_posts.IDASIDfrom (wp_postsleft joinwp_postsp2on((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;

    Thread Starter Spidergirl1979

    (@spidergirl1979)

    This 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.zip

    I’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!

    Thread Starter Spidergirl1979

    (@spidergirl1979)

    Thanks 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.

Viewing 8 replies - 1 through 8 (of 8 total)