¿Cómo programar en Grimport?

Pídenos ayuda con la programación en Grimport TRANSLATE THIS PAGE WITHOUT TOUCHING THE CODES

Mistakes & Errors

 

Finding the cause of an error


To find the cause of the error, you have to understand what it says. Example: Prestashop returns an error telling us that the name of a product is not valid.

We will go up in the different "floors" of the transmission of information (the + represents the confidence we can have in the technological maturity):

  • 0. Target site (+)
  • 1. HTTP request from the crawler (++)
  • 2. Grimport source code (+)
  • 3. HTTP request sent by Grimport to the module (= commands displayed in console) (+)
  • 4. PHP functions library of the module (++)
  • 5. Prestashop framework (or other) (++)
  • 6. PHP / Database (+++)

So in our example, we start from the Prestashop Framework level and work our way up. We can try to go into the PHP function to see if there is a problem, but generally we can trust this layer. We go further up to the request and we notice, for example, that there is no name. Then we'll find another problem in the Grimport code that explains this problem.

 

 

Common mistakes/errors at the beginning


  • Look in the PHP and Grimport functions library, there is always a function corresponding to the need. Avoid creating functions by yourself, they are often long to debug.
  • Forgot to send() with the function() or sendStack() with functionStack().
  • Forgot the escape sequence (\) in regular expressions.
  • Forgot the 4th argument _postProcessing in the cleanSelect() for some variables (price, description,...).
  • Forgot to put in developer mode on Grimport Script Editor.
  • Forgot to use Crawl script instead of Simple script.
  • Forget to open XAMPP and to put start next to Apache and MySQL when you are on a local server. Your scripts will not be displayed in Grimport.
  • Error: "No Grimport-Crawler.exe". You have to open the software in administrator mode.

 

Error codes (500, 503, etc.)


404 error:

If it is the page: http://domain.com/modules/megaimporter/pages/communication.php.

You need to make a recursive CHMOD 777 on the folder and files in modules/megaimporter. Also put the /modules/ folder in 777.

401 error:

The page you are looking for requires authentication and rejects you.

503 error:

The site is in maintenance mode, this must be deactivated or add your IP to the maintenance IPs (Preferences > Maintenance).

403 error:

  • The provider's site has refused to show you the page for an undisclosed reason, you need to open the apache logs to identify the error.
  • Another possibility is that CloudFlare block your request. The security against multiple or heavy calls must be disabled there.
  • 403 error from the server:

          -> The firewall blocks the module. Change the software settings and put "SecFilterEngine Off" in the root .htaccess.

500 error:

  • On CMS, go in the backoffice > Advanced Parameters > Performance > Debug mode, switch to Yes, save and retest.
  • Usually comes from your server, probably in development, which asks for a password by the Digest method, you must disable this protection.
  • Can also come from an unavailable host.
  • Intermittent 500 error:
  •       ->A limitation causes a ban, usually you need to increase the size of the post_max_size directive in php.ini

  • 500 error during parsing but not at the beginning:

          -> some modules like suhosin limit the number of requests, please add or replace these lines to php.ini:

    •          -  post_max_size = 10M
    •          - max_input_vars = 1000
    •          - suhosin.post.max_vars = 1000
    •          - suhosin.request.max_vars = 1000
  • Server returned HTTP response code: 500 for URL: http://domain.com/modules/megaimporter/pages/communicatico.php?clef=XXXXXXX

          -> Typical error with module rights. Go into your FTP access and apply a recursive CHMOD 777 to the folders and files in the /modules/megaimporter/ directory.

                 If this does not work, try a recursive CHMOD 755 on folders and a recursive CHMOD 644 on files in the same directory.

 

Java


Java unsupported major minor version 52.0 :

Update Java

Java' is not recognised as an internal or external command, an executable program or a command file:

You need to install Java: https://www.java.com/download/

 

Other


Can't run LAUNCH.sh on Mac:

1) Download the run.jar and the LAUNCH.sh in the same folder
2) Open a Terminal
3) Type "sh" (sh followed by a space without quotes)
4) Drag and drop the LAUNCH.sh into the terminal, this will write the path to the LAUNCH.sh after the command
5) Press Enter

If error "run.jar not found" :

  • Open the LAUNCH.sh with a text editor
  • Locate run.jar
  • Add its absolute path (its location on the disk) in front of it so that it is located in a non-relative way.

 

 


Next ❯ ❮ Previous