Osclass Support Forums

General osclass questions => General discussion => Topic started by: pipetko on December 22, 2020, 07:59:57 PM

Title: I need to make a fresh install, how to export all ads and users ?
Post by: pipetko on December 22, 2020, 07:59:57 PM
Hello, I have an old osclass, that is little messed up after "upgrading" with the many developer versions. I tried to upgrade with this one, bu the whole website died and messed up even more.
So now I want to make clean install with the OsclassPoint version of osclass, but here is a problem. I dont have huge number of ads or users, but still is a problem.

Is there a way to backup all users and ads and later import them easily ?
Title: Re: I need to make a fresh install, how to export all ads and users ?
Post by: MB Themes on December 23, 2020, 02:25:04 PM
@pipetko
This can be time consuming task. First I would try:
- remove all files except oc-content folder and config.php
- download osclass (https://osclass-classifieds.com/download) and extract it in your installation folder
- go to oc-admin and check if you are prompted for upgrade

Alternative is:
- download oc-content/uploads folder
- export all data from sql tables (you need all of them), do export in way you can simply import data only (tables will be created by osclass)
- install osclass
- import uploads folder you've downloaded
- import data into your data tables
Title: Re: I need to make a fresh install, how to export all ads and users ?
Post by: Andrey on December 23, 2020, 05:26:26 PM
- remove all files except oc-content folder and config.php
- download osclass (https://osclass-classifieds.com/download) and extract it in your installation folder
- go to oc-admin and check if you are prompted for upgrade

Yes, in this way I switched from version 3.8 to 4.1 and then updated like everyone else.
But I would also like to transfer users and ads to a clean database.

Ad Importer Osclass plugin can't export users and ads to xml?
Title: Re: I need to make a fresh install, how to export all ads and users ?
Post by: MB Themes on December 23, 2020, 06:03:02 PM
@Andrey
No it works with listings only.
Title: Re: I need to make a fresh install, how to export all ads and users ?
Post by: pipetko on December 28, 2020, 11:03:21 PM
@pipetko
This can be time consuming task. First I would try:
- remove all files except oc-content folder and config.php
- download osclass (https://osclass-classifieds.com/download) and extract it in your installation folder
- go to oc-admin and check if you are prompted for upgrade
I will try this one.

Alternative is:
- download oc-content/uploads folder
- export all data from sql tables (you need all of them), do export in way you can simply import data only (tables will be created by osclass)
- install osclass
- import uploads folder you've downloaded
- import data into your data tables
I know about this one, but in this way if there is some mess up in the db it wont be fixed.

It is sad, there should be a way to export:
users, listings ( with files for the ads ), cathegories, theme settings, website settings ( as language website name, friendly url's data ). SEO data export of the SEO plugin will be a good thing too because it is important as well.

Most important is exporting of categories, users and listings.
Pfff :(

Thanks for all advices.

P.S. I am using the new version of a fresh new instaltion ( client order ). For now is working ok, except that uploading new Language is giving 500 error for some reason. I can upload plugins, themes no prob, only with lang is 500 error. I will create another topic for this one.
Title: Re: I need to make a fresh install, how to export all ads and users ?
Post by: pipetko on January 20, 2021, 04:10:13 PM
today tried updating... no results - oc-admin/index.php?page=upgrade is giving 500 error and thats it

I removed all old files ( except like you suggested config.php and content folder

In error log:
[20-Jan-2021 14:49:01 UTC] PHP Warning:  require_once(/oc-includes/osclass/default-constants.php): failed to open stream: No such file or directory in oc-load.php on line 45
[20-Jan-2021 14:49:01 UTC] PHP Fatal error:  require_once(): Failed opening required '/oc-includes/osclass/default-constants.php' (include_path='.:/opt/alt/php74/usr/share/pear') in /oc-load.php on line 45
[20-Jan-2021 14:49:49 UTC] PHP Warning:  require_once(/oc-includes/osclass/default-constants.php): failed to open stream: No such file or directory in /oc-load.php on line 45
[20-Jan-2021 14:49:49 UTC] PHP Fatal error:  require_once(): Failed opening required '/oc-includes/osclass/default-constants.php' (include_path='.:/opt/alt/php74/usr/share/pear') in /oc-load.php on line 45
[20-Jan-2021 14:50:03 UTC] PHP Warning:  require_once(/oc-includes/osclass/default-constants.php): failed to open stream: No such file or directory in /oc-load.php on line 45
[20-Jan-2021 14:50:03 UTC] PHP Fatal error:  require_once(): Failed opening required '/oc-includes/osclass/default-constants.php' (include_path='.:/opt/alt/php74/usr/share/pear') in /oc-load.php on line 45
[20-Jan-2021 14:50:07 UTC] PHP Warning:  require_once(/oc-includes/osclass/default-constants.php): failed to open stream: No such file or directory in /oc-load.php on line 45
[20-Jan-2021 14:50:07 UTC] PHP Fatal error:  require_once(): Failed opening required '/oc-includes/osclass/default-constants.php' (include_path='.:/opt/alt/php74/usr/share/pear') in /oc-load.php on line 45
[20-Jan-2021 14:50:41 UTC] PHP Warning:  require_once(/oc-includes/vendor/composer/autoload_real.php): failed to open stream: No such file or directory in /oc-includes/vendor/autoload.php on line 5
[20-Jan-2021 14:50:41 UTC] PHP Fatal error:  require_once(): Failed opening required '/oc-includes/vendor/composer/autoload_real.php' (include_path='.:/opt/alt/php74/usr/share/pear') in /oc-includes/vendor/autoload.php on line 5
Title: Re: I need to make a fresh install, how to export all ads and users ?
Post by: MB Themes on January 20, 2021, 04:30:49 PM
It seems you are missing numerous files.
Title: Re: I need to make a fresh install, how to export all ads and users ?
Post by: pipetko on January 20, 2021, 05:35:14 PM
It seems you are missing numerous files.
With the same archive I have already made 3 cleint websites. It is your version. I have reuploaded all files.. Same problem
Title: Re: I need to make a fresh install, how to export all ads and users ?
Post by: MB Themes on January 20, 2021, 05:58:09 PM
PHP Warning:  require_once(/oc-includes/osclass/default-constants.php): failed to open stream: No such file or directory in oc-load.php on line 45

Default constants file exists in zip, not on your site.
Title: Re: I need to make a fresh install, how to export all ads and users ?
Post by: pipetko on January 21, 2021, 09:40:53 AM
PHP Warning:  require_once(/oc-includes/osclass/default-constants.php): failed to open stream: No such file or directory in oc-load.php on line 45

Default constants file exists in zip, not on your site.
It dissapeared after downloading again from yout osclass website the osclass 4.2.2 and uploading. It turns out probably for some reason after moving the file it was corrupted ( I am with ssd on my computer ). Anyway it still gets the 500 error. The error log now is empty, nothing new there.. Thried the second option with the database.. As I expected it does not work at all. Tried new instalation and few other ways to implement the db.. no result and thats all.. it is impossible to upgrade to your version. I noticed different things in the db. I guess the EVO version is with a bit different structure than the original osclass.

You have to make payd plugin to export users, ads and cathegories... This will be for shure helpfull to a lot of people.

P.S. I have to say that to usual way of upgrade does not stop the front end of the website to work. Users CAN log in and post ads... But the admin is blocked from the Upgrade page. I can log in and after login it redirects me to the upgrade page forever and the upgrade page is with the 500 error
Title: Re: I need to make a fresh install, how to export all ads and users ?
Post by: MB Themes on January 21, 2021, 12:16:14 PM
@pipetko
Enable error log and check what is behind that error 500.
You should have removed also old files those are going to be replaced.
Title: Re: I need to make a fresh install, how to export all ads and users ?
Post by: pipetko on January 21, 2021, 01:07:40 PM
I did that. Error log is empty
Title: Re: I need to make a fresh install, how to export all ads and users ?
Post by: pipetko on April 25, 2021, 10:44:08 AM
since there is no absolutely no normal way to export neither users or ads or whatever..

What I did is:
Installing new OC with osclasspoint version

imported the db with all from my old website

I deleted users and item ables
Renamed from the old db to the new db's prefix and deleted the tables I didnt needed/used from the old db
I havent tested yet is the user registration working or not.
It is cynd of working - ads and users are there, but I am facing problems:

I cant post ads neither as user or admin - It says the ad is published successefuly, but the ad is gone. there is no ad.. Also when try to edit ad I it does not save it, actually it Gives me an error "Array" and thats it.

Owh YEs and another thing.
weirdly now front ( public ) is all in english. I have themes translation on the language, it is there, but it is showing the website only in English...... There is no info for that but I guess you put now the translations within OC for all the themes ?!
I am not interested in translation in the admin part, only the public part. But I can make a translation, I need the files and info where ot put it after that.

EdIT:
I have tested, unfortunately user registration both from admin and front end is not working as well :(

ERROR LOG:
download link: https://dox.abv.bg/download?id=27791ea0ad#
Title: Re: I need to make a fresh install, how to export all ads and users ?
Post by: MB Themes on April 25, 2021, 12:52:35 PM
This error message indicates there is wrong table structure.
25-Apr-2021 12:09:03 Europe/Sofia] PHP Notice:  Undefined index: i_login_fails in /home/public_html/oc-includes/osclass/controller/login.php on line 74

I am really not sure why you did not try just do clean installation and then export content of tables one by one.
Removing original table and replacing it with new, without checking structure does not make sense
Title: Re: I need to make a fresh install, how to export all ads and users ?
Post by: pipetko on April 25, 2021, 01:47:57 PM
This error message indicates there is wrong table structure.
25-Apr-2021 12:09:03 Europe/Sofia] PHP Notice:  Undefined index: i_login_fails in /home/public_html/oc-includes/osclass/controller/login.php on line 74

I am really not sure why you did not try just do clean installation and then export content of tables one by one.
Removing original table and replacing it with new, without checking structure does not make sense
Simple. I am not dev and just trying to do something I dont understant that good. So I am doing it the way i think it is. And since no one is giving any specific instructions.... That is how i do it.... We disqus this question from more than a
 half a year already... If i knew how to do it I wont ask or say anything here ;)
In older messages in this topic I understand that was the way i shoud do it... didnt understand that I should export each roll the data only one by one.

P.S. This with the login looks weird.. I replaced only items and existing users tables, nothing else. The user can login, but posting ads and registering new user is not working only.
Title: Re: I need to make a fresh install, how to export all ads and users ?
Post by: pipetko on April 25, 2021, 02:48:29 PM
Tried to export data one by one from the tables. But when uploadin it creates again the table.. I dont know how to remove this. I clicked option only to export data, not table + data.

P.S. Is it possible to force db upgrade even with the last version
Title: Re: I need to make a fresh install, how to export all ads and users ?
Post by: pipetko on May 02, 2021, 04:35:32 PM
Finaly I have managed to make instalation on a test site. So as I mentioned above I have tried again. So I have instaled OC with 4.3 version osclasspoint, then imported old db and oc-includes, deleted item rows and renamed f item rows from old oc, then the same with users. After that downloaded OC 4.4, upload the files and then made the upgrade sucessufully. For now it is working corectly I will test it few more days and then I will do the same with client websites
Title: Re: I need to make a fresh install, how to export all ads and users ?
Post by: MB Themes on May 02, 2021, 08:24:24 PM
@pipetko
It sounds like you were able to defeat nightmare of complicated upgrade and migration :)
Title: Re: I need to make a fresh install, how to export all ads and users ?
Post by: Nagy Csaba on May 03, 2021, 03:13:09 PM
 ;D ;D ;D ;D ;D ;D ;D ;D ;D ;D ;D ;D ;D ;D ;D ;D ;D
@pipetko
It sounds like you were able to defeat nightmare of complicated upgrade and migration :)
Title: Re: I need to make a fresh install, how to export all ads and users ?
Post by: pipetko on May 27, 2021, 09:30:26 PM
@pipetko
It sounds like you were able to defeat nightmare of complicated upgrade and migration :)
For someone that is not a dev i think without knowledge is a something :)
Well it is not without downsites. For example Search is not working, when searching for an ad it says there is no ads fro the keyword typed. But at the same time when start typing in search autofiller shows ads related to the keyword. Also on some plugins I get this error: Plugin couldn't be installed because of: Error importSQL::ModelCars
cars_attributes/struct.sqlc

the "some" plugins I've got this error are: Cars attributes, Favorite Items. I havent tested yet a lot of plugins.

All other functions seems to work.
Title: Re: I need to make a fresh install, how to export all ads and users ?
Post by: pipetko on May 27, 2021, 10:20:02 PM
;D ;D ;D ;D ;D ;D ;D ;D ;D ;D ;D ;D ;D ;D ;D ;D ;D
@pipetko
It sounds like you were able to defeat nightmare of complicated upgrade and migration :)
I see nothing funny............
Title: Re: I need to make a fresh install, how to export all ads and users ?
Post by: pipetko on May 27, 2021, 11:22:20 PM
For some reason after changing servers same settings the Locations are not showing on Ad post

Another thing I found accidentaly is that in footer I see this as User ( another browser logged as user only ). No clue if that was existing in the begginning. I sow it now.

28/05/2021 - 00:17:06 [ OPERATION OK ] Connected to 'xi395j_j36tu2t': [DBHOST] = localhost | [DBUSER] = xi395j_35kxfRey4
28/05/2021 - 00:17:06 [ OPERATION OK ] SELECT user_id, pic_ext FROM j36tu2t_t_profile_picture WHERE user_id = '425'
28/05/2021 - 00:17:06 [ OPERATION OK ] Connection with 'xi395j_j36tu2t' released properly
Title: Re: I need to make a fresh install, how to export all ads and users ?
Post by: pipetko on June 06, 2021, 06:09:15 PM
turns out I havent watching clously. So in the last OC version if  debug mode is ON, locations are not working. I sow too late the themes warning message. And because of the same I was seeing in the footer website's database and db user data as user when logged in. So now the only problem left to fix is the Search not showing data... Now weirdly all ads are shown when I activate the default Sigma theme. But veronika and other ocpoint themes ( premium themes ) are not showing ads ( with or without modifications I have made for my clients websites.

Any ideas ?! P.S. I have fixed for some of the ads location data like entering it for some of the ads manually and they still dont appear in search. No cache enabled, no difference when all plugins are disabled or enabled.

P.S. Is there any way to use Google Search in the website ?!
Title: Re: I need to make a fresh install, how to export all ads and users ?
Post by: MB Themes on June 07, 2021, 11:31:58 AM
@pipetko
In debug mode, queries footer is added on every page, including pages where json data are loaded and these results then in javascript error.
If you do not see ads after theme change, it means installation was not correctly performed and table oc_t_item_veronika is missing.
you should reinstall theme, or create table manually, or reinitiate installation functions.
Title: Re: I need to make a fresh install, how to export all ads and users ?
Post by: pipetko on June 07, 2021, 04:05:58 PM
@pipetko
In debug mode, queries footer is added on every page, including pages where json data are loaded and these results then in javascript error.
If you do not see ads after theme change, it means installation was not correctly performed and table oc_t_item_veronika is missing.
you should reinstall theme, or create table manually, or reinitiate installation functions.
Ok thats weird:
oc_t_category_veronika
oc_t_item_stats_veronika

How to  do that, quote: reinitiate installation functions
But no oc_t_item_veronika
Okey I will try reinstalling it.
Title: Re: I need to make a fresh install, how to export all ads and users ?
Post by: pipetko on June 07, 2021, 04:12:21 PM
Ok apperantly deleting it from Apperance ==> Manage Themes ==> delete theme, does not actually uninstalls the theme. All settings remained and no new tables created.
Title: Re: I need to make a fresh install, how to export all ads and users ?
Post by: MB Themes on June 07, 2021, 04:57:08 PM
Simply check struct.sql, definition of table is here
Title: Re: I need to make a fresh install, how to export all ads and users ?
Post by: pipetko on June 07, 2021, 06:45:40 PM
Simply check struct.sql, definition of table is here

I followed one of your advices, to create manually the table:

CREATE TABLE `c78o_t_item_veronika` (
  `fk_i_item_id` int(11) UNSIGNED NOT NULL,
  `s_phone` varchar(100) DEFAULT NULL,
  `i_condition` varchar(100) DEFAULT NULL,
  `i_transaction` varchar(100) DEFAULT NULL,
  `i_sold` varchar(100) DEFAULT NULL
) ENGINE=MyISAM DEFAULT CHARSET=utf8;


It worked :)

THANK YOU!!!
Title: Re: I need to make a fresh install, how to export all ads and users ?
Post by: MB Themes on June 07, 2021, 07:13:50 PM
Glad to hear that ;)