1. "Fabrik 4" helpers needed!

    You are invited to join other community members active in coding, maintaining and improving Fabrik. Please visit https://fabrik.help for more information!
    Dismiss Notice

Data recovery from another site

Discussion in 'Community' started by elmarra, Nov 10, 2022.

  1. elmarra

    elmarra Member

    Level: Community
    Hello everybody.
    I need to retrieve the data from another list.
    But I'm having trouble with the file upload field.
    Basically I had an identical site (copied with akeba), same lists, element group modules.
    Out of necessity I had to suspend it on a dedicated subdomain.
    the copy of the site remained on the main one, and by mistake the collaborator entered some data in the old and not in the new, so I had to move that data from the old to the new site.
    As mentioned, the structure is identical.
    I have some fields, data and drop-down items and a file upload item in ajax.
    The problem is on the latter.
    Import to csv is not and gave me problems in the fileupload element field.
    I have provided the data from the old site to the new one via phpmyadmin. and without problems.
    I have all the data. but does not attach them.
    Since there are two tables in the database, one of the list and one of the attachments are all populated.
    But in the list of the fabrik attaches they are not linked.
    If I open a record in detail view, the file upload attachment is empty.
    while if I open in modification the name of the attachment is present but even if I then execute the saving do not compare in the detail view.
    How can I do to recover the links also of the attachments in ajax?
    I really can't. in the case of about 1000 records it would be impossible to do it manually.
     

    Attached Files:

    Last edited: Nov 10, 2022
  2. troester

    troester Well-Known Member Staff Member

    Level: Community
    Please post (also) in English
     
  3. elmarra

    elmarra Member

    Level: Community
    I corrected, sorry but I had edited the post and in the hurry I had not noticed
     
  4. lousyfool

    lousyfool Administrator Staff Member

    Level: Community
    Obviously, a screw-up happened during the manual actions, and or there are likely mismatches in Fabrik list, element and other settings in between original and "clone". Too difficult to dissect here in detail, so I'd recommend to create a fresh new clone with Akeeba Backup and Kickstart.
    When doing so, don't forget to open, verify and (re-)save the Fabrik database connection in the clone.
     
  5. elmarra

    elmarra Member

    Level: Community
    The site of origin and the clone were exactly a copy from akeba.
    I cannot restore and start from the original site as I have other lists on the "clone" (the actual site) on which other users have entered other data.
    The list, the form and the elements are perfectly the same and no changes have been made to it.
    The import via csv fails giving me the error on the "attached" elements
    And with phpmyadmin the data is perfectly copied.
    I think and I think that is the problem, due to the fileupload set in ajax?
     
  6. troester

    troester Well-Known Member Staff Member

    Level: Community
    1.
    2. ajax fileupload entries are stored in an extra DB table, name = your-main-table_repeat_your-element-name

     
  7. elmarra

    elmarra Member

    Level: Community
    1 The "clone" site is working, the connection to the database is already active.
    2 Exactly, and in fact I copied the data from both tables. And as in the detail view the file is not there the field is empty, while if I open it and change the link to the file there is and also the link. But even if I click on save this is still not updated to the detail view.
    It always remains empty.
    I tried setting the fileupload element in ajax=no inserted a record and an attachment, and exported and imported in csv without any problem.
    So there's something in the ajax setting that's stopping me.
    The tables are populated correctly.
     
  8. troester

    troester Well-Known Member Staff Member

    Level: Community
    I'm not sure about your setup and what you have (not) copied. But this sounds as if you are looking at some different details view.
     
  9. elmarra

    elmarra Member

    Level: Community
    No, I'm looking at the correct list (it was empty before)
    then i copied the data.
    the two tables relating to the attachments:
    the first attachment table
    and the second
    my-main-table _repeat_ my-element-name
    and they are not connected anyway
     
  10. ontarget

    ontarget Active Member

    Level: Community
    This is my method of fabrik migrate
    • zip the joomla files from the master - download it to your computer
    • go to phpmyAdmin > Export the entire db as a sql file
    • Go to the clone site - upload and unzip the joomla files
    • Create a new database for the clone > import the sql file
    • Change the configuration.php in the clone site to match your new DB and directory structure
    • Login and update the fabrik connection.
    • If you have imported records that shouldn't be there you could perform some sql delete statements on dates / ids greater than on the relevant fabrik tables.
    • Word of advice I always start my fabrik tables with the prefix aaa_ as they are then grouped nicely at the top of the db so easy to check them etc.
     

Share This Page