Tusko / ACF-CPT-Options-Pages

Small addon for ACF Options. Adds ACF options page per custom post type
GNU General Public License v3.0
74 stars 15 forks source link

Update from 1.1.1 to latest causes some issues #13

Closed tiborp closed 6 years ago

tiborp commented 6 years ago

Hi Tusko,

First of all; thanks for this very handy plugin! I have an issue with the latest update though; I originally had installed the plugin (version 1.1.1) from Github, and registered my CPT options in a function file like this:


/**
 * Adjust CPT Option Page Title
 * @link https://github.com/Tusko/ACF-CPT-Options-Pages
 */

function myprefix_project_archive_options($cptmenu) {
    $cptmenu['page_title'] = 'Projects Archive';
    $cptmenu['menu_title'] = 'Projects Archive';
    return $cptmenu;
}
function myprefix_dienst_archive_options($cptmenu) {
    $cptmenu['page_title'] = 'Diensten Archive';
    $cptmenu['menu_title'] = 'Diensten Archive';
    return $cptmenu;
}
function myprefix_discipline_archive_options($cptmenu) {
    $cptmenu['page_title'] = 'Disciplines Archive';
    $cptmenu['menu_title'] = 'Disciplines Archive';
    return $cptmenu;
}
function myprefix_expertise_archive_options($cptmenu) {
    $cptmenu['page_title'] = 'Expertises Archive';
    $cptmenu['menu_title'] = 'Expertises Archive';
    return $cptmenu;
}
function myprefix_vacature_archive_options($cptmenu) {
    $cptmenu['page_title'] = 'Vacature Archive';
    $cptmenu['menu_title'] = 'Vacature Archive';
    return $cptmenu;
}
add_filter('cpt_vacature_' . ICL_LANGUAGE_CODE . '_acf_page_args', 'myprefix_vacature_archive_options');
add_filter('cpt_discipline_' . ICL_LANGUAGE_CODE . '_acf_page_args', 'myprefix_discipline_archive_options');
add_filter('cpt_expertise_' . ICL_LANGUAGE_CODE . '_acf_page_args', 'myprefix_expertise_archive_options');
add_filter('cpt_project_' . ICL_LANGUAGE_CODE . '_acf_page_args', 'myprefix_project_archive_options');
add_filter('cpt_dienst_' . ICL_LANGUAGE_CODE . '_acf_page_args', 'myprefix_dienst_archive_options');

I have installed the plugin (dowloaded from Github to be precise) on a client's multisite (with WPML installed), and they updated the plugin since there was an update notice in the backend. After doing this, all option pages where no longer visible in the admin menu. I guess because these are now made with the new settings page you added for the plugin.

Adding them in the new settings page works, but then all values that where saved earlier are no longer visisble; apparently the meta keys have changed too.

I did not dive into the matter any futher so far, but thought it's worthwhile you know this is happening :-) I guess for now I'll have downgrade to the earlier version as a workaround?

Cheers, Tibor

Tusko commented 6 years ago

hello @tiborp ! Thank you for the issue. I know about different slugs in v2+

Please view a related issue to fix your problem: https://github.com/Tusko/ACF-CPT-Options-Pages/issues/12