Jump to content

Unable to open CMS in Backend in Prestashop 1.7.6.1


Recommended Posts

Hi,

Please Help or tell me where to go and ask help

 Actually I recently noticed that I am not able to find a way to edit CMS pages in backend. As Pages option under Design menu was not there!! and upon searching alot on Google and in forums and asking for help nothing helped out. But then somewhere I found about the Schema Structure of Database.

So, I checked the database and found the rows defining tabs were missing in two table, one for controller routing and other one for showing Text on particular tab in Dashboard menu. So, I added the values there by trying different values and finally the PAGES option is start showing up in backed and routing to the correct controller, as the errors stops after trying different values. But whenever I click on that option without any error now Dashboard opens up. and in Url the bar of browser the following URL address is being routed

https://www.accessorybee.com/store/xxxxxxxxx/index.php/improve/design/cms-pages/index.php?controller=AdminDashboard&token=XXXXXXX292573fb4e36bXXXXXXXXXXXX

Also after clicking Pages button the progress bar of browser waits for 4 to 5 seconds like something is being calculating and looks like its kinda failed so Dashboard is being shown up.

Please help out as access to CMS pages is totally blocked and I am unable to edit or add any CMS Page. 

Will be thankful for any help.

Link to comment
Share on other sites

  • 2 weeks later...
On 7/12/2020 at 10:07 PM, SectioPrima said:

I have the exact same problem. Opened a thread a while before and also got no answer from anybody. Can't find a solution anywhere in google also..
Pls if someone knows a fix share it here..

Looks like I am not the only one who is pulling his hair due to frustration. Actually what I think is that I should have chosen Magento instead of Prestashop. This is real pin in a.. if it screws up!!! and mostly it does.

Link to comment
Share on other sites

Hello, Please follow my step. Maybe it can be useful for you.

1) Enter DB of the shop. 

2) Find the table ps_cms_category. Enter it.

3) First take backup for this table. Then change id_parent to 0 for all records.

4) Then again try to navigate CMS pages.

Also enable HTML option in BO (under General tab).

Let me know about the result.

 

If this way will be useless restore the modified table, and share image of problem here.

Edited by PrestaServicePro (see edit history)
Link to comment
Share on other sites

52 minutes ago, PrestaServicePro said:

Hello, Please follow my step. Maybe it can be useful for you.

1) Enter DB of the shop. 

2) Find the table ps_cms_category. Enter it.

3) First take backup for this table. Then change id_parent to 0 for all records.

4) Then again try to navigate CMS pages.

Also enable HTML option in BO (under General tab).

Let me know about the result.

 

If this way will be useless restore the modified table, and share image of problem here.

Hi,

I checked the DB and found only one entry in the ps_cms_category and in id_parent the value entered is already 0 !

What should I do as HTML option is also enabled.

Db cms_category table.png

Link to comment
Share on other sites

In Url the bar of browser the following URL address is being routed

https://www.accessorybee.com/store/xxxxxxxxx/index.php/improve/design/cms-pages/index.php?controller=AdminDashboard&token=XXXXXXX292573fb4e36bXXXXXXXXXXXX

Also after clicking Pages button the progress bar of browser waits for 4 to 5 seconds like something is being calculating and looks like its kinda failed so Dashboard is being shown up.

Actually the pages option was not showing so I manually entered the values in two tables in Database to add a new tab as I found through searching in Google and forums that it can be added. But now I forgot which tables were those, otherwise will have sent you a screenshot of them also.

Click on Pages menu option.png

Link to comment
Share on other sites

Hi,

I found those two tables in which I added entries and option under Design Menu starts appearing. Actually I manually added the entries which should be there. But I dont know If I had done anything wrong or incomplete.

I am attaching the screen shots for you to check

psvb_tab table entry values.png

psvb_tab table.png

psvb_tab_lang table.png

Link to comment
Share on other sites

  • razaro changed the title to Unable to open CMS in Backend in Prestashop 1.7.6.1
  • 2 weeks later...
  • 4 weeks later...

in my case i resolved the bug by adding 4 lignes into table authorization_role and acces 

 

into  prefix_authorization_role add 

ROLE_MOD_TAB_ADMINCMSCONTENT_CREATE

ROLE_MOD_TAB_ADMINCMSCONTENT_DELETE

ROLE_MOD_TAB_ADMINCMSCONTENT_READ

ROLE_MOD_TAB_ADMINCMSCONTENT_UPDATE

 

then into acces table 

add id_authorization_role into acces - (id_profil=1 id_authorization_role)   

 

Link to comment
Share on other sites

  • 2 weeks later...
On 8/26/2020 at 6:39 PM, saidani said:

in my case i resolved the bug by adding 4 lignes into table authorization_role and acces 

 

into  prefix_authorization_role add 

ROLE_MOD_TAB_ADMINCMSCONTENT_CREATE

ROLE_MOD_TAB_ADMINCMSCONTENT_DELETE

ROLE_MOD_TAB_ADMINCMSCONTENT_READ

ROLE_MOD_TAB_ADMINCMSCONTENT_UPDATE

 

then into acces table 

add id_authorization_role into acces - (id_profil=1 id_authorization_role)   

 

Thankss Buddy its working now!!! You are genius it worked in one shot!! God Bless You Buddy

  • Like 1
Link to comment
Share on other sites

  • 2 years later...

 

On 8/26/2020 at 2:09 PM, saidani said:

in my case i resolved the bug by adding 4 lignes into table authorization_role and acces 

 

into  prefix_authorization_role add 

ROLE_MOD_TAB_ADMINCMSCONTENT_CREATE

ROLE_MOD_TAB_ADMINCMSCONTENT_DELETE

ROLE_MOD_TAB_ADMINCMSCONTENT_READ

ROLE_MOD_TAB_ADMINCMSCONTENT_UPDATE

 

then into acces table 

add id_authorization_role into acces - (id_profil=1 id_authorization_role)   

 

It seems to be a good solution for my case but I dont know how to do this,. can you explain better please.

PS 1.7 CMS MISSING in BOFIFCE

Link to comment
Share on other sites

Just save this script in the root of the eshop and run it.
Add missing profiles for CMS pages to the database.

<?php

/* 'id_profile' => '1' = Admin profile */

include('./config/config.inc.php');
include('./init.php');

$db = Db::getInstance();

$existCmsCreate = $db->getValue('SELECT id_authorization_role FROM '._DB_PREFIX_.'authorization_role WHERE slug = \'ROLE_MOD_TAB_ADMINCMSCONTENT_CREATE\'');
$existCmsDelete = $db->getValue('SELECT id_authorization_role FROM '._DB_PREFIX_.'authorization_role WHERE slug = \'ROLE_MOD_TAB_ADMINCMSCONTENT_DELETE\'');
$existCmsRead = $db->getValue('SELECT id_authorization_role FROM '._DB_PREFIX_.'authorization_role WHERE slug = \'ROLE_MOD_TAB_ADMINCMSCONTENT_READ\'');
$existCmsUpdate = $db->getValue('SELECT id_authorization_role FROM '._DB_PREFIX_.'authorization_role WHERE slug = \'ROLE_MOD_TAB_ADMINCMSCONTENT_UPDATE\'');

// ROLE_MOD_TAB_ADMINCMSCONTENT_CREATE
if (!$existCmsCreate) {
    $db->insert('authorization_role',
        array(
            'slug' => 'ROLE_MOD_TAB_ADMINCMSCONTENT_CREATE'
        )
    );
    $insertedId = $db->Insert_ID();
    $db->insert('access',
        array(
            'id_profile' => '1',
            'id_authorization_role' => $insertedId
        )
    );

    echo 'added ROLE_MOD_TAB_ADMINCMSCONTENT_CREATE<br>';
} else {
    $checkIfExistsInAccessCmsCreate = $db->getValue('SELECT id_profile FROM '._DB_PREFIX_.'access WHERE id_authorization_role = '.$existCmsCreate);

    if (!$checkIfExistsInAccessCmsCreate)  {
        $db->insert('access',
            array(
                'id_profile' => '1',
                'id_authorization_role' => $existCmsCreate
            )
        );    
    }
}

// ROLE_MOD_TAB_ADMINCMSCONTENT_DELETE
if (!$existCmsDelete) {
    $db->insert('authorization_role',
        array(
            'slug' => 'ROLE_MOD_TAB_ADMINCMSCONTENT_DELETE'
        )
    );
    $insertedId = $db->Insert_ID();
    $db->insert('access',
        array(
            'id_profile' => '1',
            'id_authorization_role' => $insertedId
        )
    );

    echo 'added ROLE_MOD_TAB_ADMINCMSCONTENT_DELETE<br>';
} else {
    $checkIfExistsInAccessCmsDelete = $db->getValue('SELECT id_profile FROM '._DB_PREFIX_.'access WHERE id_authorization_role = '.$existCmsDelete);

    if (!$checkIfExistsInAccessCmsDelete)  {
        $db->insert('access',
            array(
                'id_profile' => '1',
                'id_authorization_role' => $existCmsDelete
            )
        );    
    }
}

// ROLE_MOD_TAB_ADMINCMSCONTENT_READ
if (!$existCmsRead) {
    $db->insert('authorization_role',
        array(
            'slug' => 'ROLE_MOD_TAB_ADMINCMSCONTENT_READ'
        )
    );
    $insertedId = $db->Insert_ID();
    $db->insert('access',
        array(
            'id_profile' => '1',
            'id_authorization_role' => $insertedId
        )
    );

    echo 'added ROLE_MOD_TAB_ADMINCMSCONTENT_READ<br>';
}  else {
    $checkIfExistsInAccessCmsRead = $db->getValue('SELECT id_profile FROM '._DB_PREFIX_.'access WHERE id_authorization_role = '.$existCmsRead);

    if (!$checkIfExistsInAccessCmsRead)  {
        $db->insert('access',
            array(
                'id_profile' => '1',
                'id_authorization_role' => $existCmsRead
            )
        );    
    }
}

// ROLE_MOD_TAB_ADMINCMSCONTENT_UPDATE
if (!$existCmsUpdate) {
    $db->insert('authorization_role',
        array(
            'slug' => 'ROLE_MOD_TAB_ADMINCMSCONTENT_UPDATE'
        )
    );
    $insertedId = $db->Insert_ID();
    $db->insert('access',
        array(
            'id_profile' => '1',
            'id_authorization_role' => $insertedId
        )
    );

    echo 'added ROLE_MOD_TAB_ADMINCMSCONTENT_UPDATE<br>';
}  else {
    $checkIfExistsInAccessCmsUpdate = $db->getValue('SELECT id_profile FROM '._DB_PREFIX_.'access WHERE id_authorization_role = '.$existCmsUpdate);

    if (!$checkIfExistsInAccessCmsUpdate)  {
        $db->insert('access',
            array(
                'id_profile' => '1',
                'id_authorization_role' => $existCmsUpdate
            )
        );  
    }
}

 

Edited by ps8moduly.cz (see edit history)
Link to comment
Share on other sites

11 hours ago, ps8moduly.cz said:

Just save this script in the root of the eshop and run it.
Add missing profiles for CMS pages to the database.

<?php

/* 'id_profile' => '1' = Admin profile */

include('./config/config.inc.php');
include('./init.php');

$db = Db::getInstance();

$existCmsCreate = $db->getValue('SELECT id_authorization_role FROM '._DB_PREFIX_.'authorization_role WHERE slug = \'ROLE_MOD_TAB_ADMINCMSCONTENT_CREATE\'');
$existCmsDelete = $db->getValue('SELECT id_authorization_role FROM '._DB_PREFIX_.'authorization_role WHERE slug = \'ROLE_MOD_TAB_ADMINCMSCONTENT_DELETE\'');
$existCmsRead = $db->getValue('SELECT id_authorization_role FROM '._DB_PREFIX_.'authorization_role WHERE slug = \'ROLE_MOD_TAB_ADMINCMSCONTENT_READ\'');
$existCmsUpdate = $db->getValue('SELECT id_authorization_role FROM '._DB_PREFIX_.'authorization_role WHERE slug = \'ROLE_MOD_TAB_ADMINCMSCONTENT_UPDATE\'');

// ROLE_MOD_TAB_ADMINCMSCONTENT_CREATE
if (!$existCmsCreate) {
    $db->insert('authorization_role',
        array(
            'slug' => 'ROLE_MOD_TAB_ADMINCMSCONTENT_CREATE'
        )
    );
    $insertedId = $db->Insert_ID();
    $db->insert('access',
        array(
            'id_profile' => '1',
            'id_authorization_role' => $insertedId
        )
    );

    echo 'added ROLE_MOD_TAB_ADMINCMSCONTENT_CREATE<br>';
} else {
    $checkIfExistsInAccessCmsCreate = $db->getValue('SELECT id_profile FROM '._DB_PREFIX_.'access WHERE id_authorization_role = '.$existCmsCreate);

    if (!$checkIfExistsInAccessCmsCreate)  {
        $db->insert('access',
            array(
                'id_profile' => '1',
                'id_authorization_role' => $existCmsCreate
            )
        );    
    }
}

// ROLE_MOD_TAB_ADMINCMSCONTENT_DELETE
if (!$existCmsDelete) {
    $db->insert('authorization_role',
        array(
            'slug' => 'ROLE_MOD_TAB_ADMINCMSCONTENT_DELETE'
        )
    );
    $insertedId = $db->Insert_ID();
    $db->insert('access',
        array(
            'id_profile' => '1',
            'id_authorization_role' => $insertedId
        )
    );

    echo 'added ROLE_MOD_TAB_ADMINCMSCONTENT_DELETE<br>';
} else {
    $checkIfExistsInAccessCmsDelete = $db->getValue('SELECT id_profile FROM '._DB_PREFIX_.'access WHERE id_authorization_role = '.$existCmsDelete);

    if (!$checkIfExistsInAccessCmsDelete)  {
        $db->insert('access',
            array(
                'id_profile' => '1',
                'id_authorization_role' => $existCmsDelete
            )
        );    
    }
}

// ROLE_MOD_TAB_ADMINCMSCONTENT_READ
if (!$existCmsRead) {
    $db->insert('authorization_role',
        array(
            'slug' => 'ROLE_MOD_TAB_ADMINCMSCONTENT_READ'
        )
    );
    $insertedId = $db->Insert_ID();
    $db->insert('access',
        array(
            'id_profile' => '1',
            'id_authorization_role' => $insertedId
        )
    );

    echo 'added ROLE_MOD_TAB_ADMINCMSCONTENT_READ<br>';
}  else {
    $checkIfExistsInAccessCmsRead = $db->getValue('SELECT id_profile FROM '._DB_PREFIX_.'access WHERE id_authorization_role = '.$existCmsRead);

    if (!$checkIfExistsInAccessCmsRead)  {
        $db->insert('access',
            array(
                'id_profile' => '1',
                'id_authorization_role' => $existCmsRead
            )
        );    
    }
}

// ROLE_MOD_TAB_ADMINCMSCONTENT_UPDATE
if (!$existCmsUpdate) {
    $db->insert('authorization_role',
        array(
            'slug' => 'ROLE_MOD_TAB_ADMINCMSCONTENT_UPDATE'
        )
    );
    $insertedId = $db->Insert_ID();
    $db->insert('access',
        array(
            'id_profile' => '1',
            'id_authorization_role' => $insertedId
        )
    );

    echo 'added ROLE_MOD_TAB_ADMINCMSCONTENT_UPDATE<br>';
}  else {
    $checkIfExistsInAccessCmsUpdate = $db->getValue('SELECT id_profile FROM '._DB_PREFIX_.'access WHERE id_authorization_role = '.$existCmsUpdate);

    if (!$checkIfExistsInAccessCmsUpdate)  {
        $db->insert('access',
            array(
                'id_profile' => '1',
                'id_authorization_role' => $existCmsUpdate
            )
        );  
    }
}

 

Hi ps8moduly.cz

I´m sorry but my skills in code are limited.

You suggest to put this code in root but what file of presta?

Thank you very much for helping me.

 

Link to comment
Share on other sites

Hi.

Open a text editor, paste the entire code into it and save it as, for example, repairCMS.php.
Upload the file repairCMS.php to FTP to the main folder where you have Prestashop installed.
Then enter a link to the file in the URL of your eshop, something like https://mysite.com/repairCMS.php

Then you can check in the database if there are records.

Edited by ps8moduly.cz (see edit history)
  • Like 1
Link to comment
Share on other sites

Hi.

Thanks again for your help.

I think I do it all right but don´t see changes.

I clean cache, clean cookie, anonimus page and other safari browser.

Capturadeecra2023-07-05as18_10_04.thumb.png.24f3778b875a0d0e4421005028e79ab4.png

 

 

Still white page!

 

Capturadeecra2023-07-05as18_14_03.thumb.png.d920f108f2b9ed615390180580261571.png

 

As I sayd the CMS is there except category.

Could be a language problem?

 

Capturadeecra2023-07-05as18_17_04.thumb.png.d45f6841913e186a54ee6fab679bf7db.png

 

 

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...