Ask the community

This is a community support forum where you can ask
questions and interact with other PremiumPress Customers.

How to stop ACCESS field content in the csv import to change automatically?

  • Charles
    Charles
    Senior Member 149 points
    July 24, 2014 at 1:26 am

    Hi,
    WP 3.9.1 and DT 6.6.0

    We just noticed that when we restrict access of the listings by selecting the ACCESS field: Membership0 and Membership1 the system assigns the following content to the csv export for that listing:
    a:2:{i:0;s:1:”0″;i:1;s:1:”1″;}

    But, if we upload a csv with said content, the system automatically and/or internally changes it (the ACCESS field content) to the following:
    s:30:”a:2:{i:0;s:1:”0″;i:1;s:1:”1″;}”;

    The issue is that with the second content, the system does not restrict access to Expired Members. With the first one, it does and this is the one we need.

    So, we would like to know how to fix this issue:
    1. If we enter in the excel csv the following content:
    a:2:{i:0;s:1:”0″;i:1;s:1:”1″;}
    which is the one we need since we want to restrict listing access so that ONLY active/paid Memberships can VIEW listings contents, the system simply changes it after importing to s:30:”a:2:{i:0;s:1:”0″;i:1;s:1:”1″;}”;

    Our current workaround is import all listings, then go one by one and edit every listing by selecting the ACCESS field, but it is too time consuming. We need a not-too-time-consuming csv import workaround.

    Thanks!

  • Charles
    Charles
    Senior Member 149 points
    July 29, 2014 at 2:45 am

    Hi Mark,
    Would you please take a look at this issue?
    Thanks in advance!

  • Charles
    Charles
    Senior Member 149 points
    August 1, 2014 at 4:09 pm

    Hi Mark,
    When you have time, would you please take a look at this issue or should we open a support ticket?
    Thanks!

  • Clive
    Clive
    Super Guru 1,818 points
    August 1, 2014 at 9:38 pm

    Open a support ticket Charles: http://www.premiumpress.com/ticket/

  • Charles
    Charles
    Senior Member 149 points
    August 1, 2014 at 11:04 pm

    Hi Clive,
    As instructed ticket was created: #VGM-861-23783
    Thanks.

  • Mark Fail
    Mark Fail
    Super Guru 12,822 points
    August 2, 2014 at 4:50 am

    hi Charles

    The code for ‘access’ is saved as an array in WordPress, you cannot modify this and re-import as the import is a flat file and thus wont accept array values since there is no array support in the cSV plugin.

  • Charles
    Charles
    Senior Member 149 points
    August 2, 2014 at 1:10 pm

    Hi Mark,
    Thanks for the reply.
    1. Any chance that we can update the ACCESS field for all listings via phpMyAdmin executing an SQL command?
    2. As an alternative, any chance that the ACCESS field content a:2:{i:0;s:1:”0″;i:1;s:1:”1″;} be converted to urlencode()d or rawurlencode() like mentioned in this link: http://www.tuxradar.com/practicalphp/5/11/0#null – If yes, what would be the php code to convert from serialized to urlencode()d / rawurlencode()? I am not a php expert but if you provide the php code, I know how to run it on my server to obtain the correct string and test it in the csv. Maybe it could work.
    I have to find a workaround to avoid having to edit every listing 1 by 1.

    Thanks again!

  • Charles
    Charles
    Senior Member 149 points
    September 1, 2014 at 10:36 am

    Hi Mark,

    1. Any chance that we can update the ACCESS field for all listings via phpMyAdmin executing an SQL command? If yes, what would be the correct command?
    Thanks.


  • Lisa
    Newbie 2 points
    October 29, 2014 at 6:14 am

    I am having the same issue. Where else can be restrict access for listings on a mass scale. Doing it one by one is not an option for listings in mass. How about the editor on the php page?

Viewing 9 posts - 1 through 9 (of 9 total)