Hi,
I have to set the cron url to make imports every x hours .
By following the guidance, I created a menu item that gives me the address that I use ( eg . Index.php?Option=com_csvi&view=import&csvi_template_id=7&key=aaa&task=import ) but if you paste it into the address bar, it does not run .
What should I do?
Best regarsd
Hello,
You cannot run a cron file from browser but you can run it from command line interface. It is explained in the Setting up the cron url document.
Kind regards,
Tharuna
=========================
If you use our extensions, please post a rating and a review at the Joomla! Extension Directory
ok, with the old version I used www.mysite.it/administrator/components/com_csvi/helpers/cron.php?username=admin&passwd=xxxxxxx&template_id=15 to run import from the address bar.
Now how can I do?
Hello,
This is not possible with new version, you can only do it with command line interface. It is explained in the document i linked earlier.
Kind regards,
Tharuna
=========================
If you use our extensions, please post a rating and a review at the Joomla! Extension Directory
Hello,
To create a front-end import template, all you need to do is create a menu item of the type Import front-end. Once you have created the menu item, you have the link to your menu item and you can use that link to trigger the import.
That should do it. Let me know how it goes.
Kind regards,
RolandD
=========================
If you use our extensions, please post a rating and a review at the Joomla! Extension Directory
Hi,
I have already tried but I get error 500 and does not run anything...
Hello,
500 error is something which wont give us information on what went wrong. The details of this error will be in your server logs. You can ask your hosting provider about this server error logs to check on the error. But before that have a look at 500 internal error document and see if the instructions given in the document can help you solve the issue yourself.
Kind regards,
Tharuna
=========================
If you use our extensions, please post a rating and a review at the Joomla! Extension Directory
I checked and everything is set correctly ...
it is normal for the same imports , from the backend does not give me any error ?
Hello,
Did you check your server error logs? without that it is difficult to find the cause for the error.
Kind regards,
Tharuna
=========================
If you use our extensions, please post a rating and a review at the Joomla! Extension Directory
hi,
in server error logs there is no error...
Hello,
If its a 500 error there should be something in your server logs as it is server which is stopping CSVI. If you are looking at correct server logs and no error then your server has been badly configured. Talk to your hosting provider and tell them about the 500 error.
Kind regards,
Tharuna
=========================
If you use our extensions, please post a rating and a review at the Joomla! Extension Directory
Hi,
It is badly configured for the component ? or because there are no error logs?
Hello,
Badly configured because there is no error logs. 500 error should have some error logged in your server error logs.
Kind regards,
Tharuna
=========================
If you use our extensions, please post a rating and a review at the Joomla! Extension Directory
Hello,
The server has no record whatsoever of throwing an internal server error? That will make it impossible to fix an error if the server only says crash and I won't tell you why.
Which PHP version are you running?
Kind regards,
RolandD
=========================
If you use our extensions, please post a rating and a review at the Joomla! Extension Directory
PHP Version 5.6.24
We will need the server error in that case.
Kind regards,
RolandD
=========================
If you use our extensions, please post a rating and a review at the Joomla! Extension Directory
Hi friends.
Searching fot same issue I find that.
I need to configure cronjobs at same way, by frontend url...I configure all and receive a 500 error. Finally you solved that?
In server's log errors doesn't appears nothing...but in access log appears that.
public ip - - [29/Sep/2016:19:59:20 +0200] "GET /index.php?option=com_csvi&view=import&csvi_template_id=2&key=privatekeyt&task=import HTTP/1.1" 500 - "-" "Mozilla/5.0 (Windows NT 10.0; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/53.0.2785.116 Safari/537.36" "www.domainname.com"
public ip - - [29/Sep/2016:19:59:18 +0200] "GET /index.php?option=com_csvi&view=import&csvi_template_id=2&key=privatekey&task=import HTTP/1.1" 500 - "-" "Mozilla/5.0 (Windows NT 10.0; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/53.0.2785.116 Safari/537.36" "www.domainname.com"
Hello,
You should be having the log of 500 error and why it is happening in your server error logs, if not all i could say is your server has been badly configured. Access logs wont give us required information. You need to talk to your hosting provider on the same. Only way to know about 500 error is from your server error logs.
Kind regards,
Tharuna
=========================
If you use our extensions, please post a rating and a review at the Joomla! Extension Directory
Hello.
This problem is in my demo server too. I has the server fisical in my office.
I have checking the apache's error.log and nothing. I am checking all logs in the server and nothing, I saw the php.ini to check the log configuration and all is ok.
I don't know what more can I do.
Finally I got something!!
I renamed some parts of the path for privacy.
Fatal error: Call to a member function getEnabled() on a non-object in /var/directory/hostdata/directory/public_html/host_space/components/com_csvi/controllers/imports.php on line 66
I hope that thin could help.
Thanks
Hello,
May i know which version of CSVI are you using? The line the error is pointing to don't have any such code in latest version.
Kind regards,
Tharuna
=========================
If you use our extensions, please post a rating and a review at the Joomla! Extension Directory
I saw too that the line 66 are empty...in developer and production site have same error.
It's the latest version 6.6.4
Hello,
That is really strange. what if you try import manually in CSVI from Joomla admin? do you see the same error?
Kind regards,
Tharuna
=========================
If you use our extensions, please post a rating and a review at the Joomla! Extension Directory
Yes, I have used these themplates for months as manually import.
I enabled the frontend cron and I created a menu item with menu import. I think that I did all well.
I created a new template very simple for try that and I had same error.
I have as process import 6 csv and all templates has the same error in cron but in manually import works fine.
Thanks for your help.
Hello,
The fatal error you see as the last one happens because CSVI can't find your template ID. Which URL are you using to trigger the front-end import?
Just for my curiosity, why not use a real cron job?
Kind regards,
RolandD
=========================
If you use our extensions, please post a rating and a review at the Joomla! Extension Directory
Hello.
I can't use the cronjob as a command because our hosting don't let us configure that. We only can program cronjobs calling an url.
I call the cron on frontend with the automatic joomla generated url. I tried several templates...
domain.com/index.php?option=com_csvi&view=import&csvi_template_id=2&key=key&task=import
Hello,
I am still amazed that hosting companies do not allow such a basic feature. Anyways, let's look at the issue.
The URL looks all good, I tested with this URL and that import went fine as well. So the question looks more like, how come your server doesn't load the template. Is there any restriction on what is being passed to the script? Can this cron URL you are allowed to use have any parameters?
Kind regards,
RolandD
=========================
If you use our extensions, please post a rating and a review at the Joomla! Extension Directory
I pasted te real url that I try access. All parameters are configured in the template so in url I don't add any parameters more.
Could I do some test? Or there are some private to send you credentials to test.
Thanis
Hello,
With the parameters I meant this part
I have seen in the past that hosts like yours implement a lot of restrictions, otherwise they would allow normal cron jobs. Since this is an issue with your host and not CSVI, you will need to test yourself.
If you always get the error on line 66, try to see which variables are available. You can do that with this code [code type="markup"]?><pre><?php
echo __FILE__ . '::' . __LINE__;
echo 'Variables';
echo '<br />';
print_r($this->input);
?></pre><?php
perhaps it will be good to add this debug code as well:
?><pre><?php
echo __FILE__ . '::' . __LINE__;
echo 'GET Variables';
echo '<br />';
print_r($_GET);
?></pre><?php
Kind regards,
RolandD
=========================
If you use our extensions, please post a rating and a review at the Joomla! Extension Directory
I receive this message:
/var/sentora/hostdata/name/public_html/domainname.com/components/components/com_csvi/controllers/imports.php::66Variables
FOFInput Object
(
[options:protected] => Array
(
)
[filter:protected] => JFilterInput Object
(
[stripUSC] => 0
[tagsArray] => Array
(
)
[attrArray] => Array
(
)
[tagsMethod] => 0
[attrMethod] => 0
[xssAuto] => 1
[tagBlacklist] => Array
(
[0] => applet
[1] => body
[2] => bgsound
[3] => base
[4] => basefont
[5] => embed
[6] => frame
[7] => frameset
[8] => head
[9] => html
[10] => id
[11] => iframe
[12] => ilayer
[13] => layer
[14] => link
[15] => meta
[16] => name
[17] => object
[18] => script
[19] => style
[20] => title
[21] => xml
)
[attrBlacklist] => Array
(
[0] => action
[1] => background
[2] => codebase
[3] => dynsrc
[4] => lowsrc
)
)
[data:protected] => Array
(
[Itemid] => 416
[option] => com_csvi
[view] => import
[csvi_template_id] => 1
[key] => key
[task] => import
[ark_inine_enabled] =>
[arkoption] => com_csvi
[layout] =>
)
[inputs:protected] => Array
(
)
)
/var/sentora/hostdata/name/public_html/domainname.com/components/components/com_csvi/controllers/imports.php::72GET Variables
Array
(
)
Fatal error: Call to a member function getEnabled() on a non-object in /var/sentora/hostdata/name/public_html/domainname.com/components/com_csvi/controllers/imports.php on line 78
Hello,
This shows that the parameters do come through. So that is a good first step. What do you get when you add this code on line 65.
?><pre><?php
echo __FILE__ . '::' . __LINE__;
echo 'template ID';
echo '<br />';
print_r($templateId);
?></pre><?php
?><pre><?php
echo __FILE__ . '::' . __LINE__;
echo 'template';
echo '<br />';
print_r(get_class_methods($template));
print_r($template);
?></pre><?php
Kind regards,
RolandD
=========================
If you use our extensions, please post a rating and a review at the Joomla! Extension Directory
/var/sentora/hostdata/directory/public_html/directory/components/com_csvi/controllers/imports.php::66template ID
1
/var/sentora/hostdata/directory/public_html/directory/components/com_csvi/controllers/imports.php::72template
Fatal error: Call to a member function getEnabled() on a non-object in /var/sentora/hostdata/directory/public_html/directory/components/com_csvi/controllers/imports.php on line 80
Hello,
As per the data in your previous post the template id is 1 but in the cron URL domain.com/index.php?option=com_csvi&view=import&csvi_template_id=2&key=key&task=import you are trying to call csvi_template_id as 2. Try changing your cron URL and see if it works.
[data:protected] => Array
(
[Itemid] => 416
[option] => com_csvi
[view] => import
[csvi_template_id] => 1
[key] => key
[task] => import
[ark_inine_enabled] =>
[arkoption] => com_csvi
[layout] =>
)
Kind regards,
Tharuna
=========================
If you use our extensions, please post a rating and a review at the Joomla! Extension Directory
That isn't the problem.
In my test, I changed the template, but the problem is the same, not is for missing id.
The url now is that:
domain.com/index.php?option=com_csvi&view=import&csvi_template_id=1&key=key&task=import
Thanks!!!
Hello,
Can you send me a private message on your site administrator login details and ftp details to check on this issue? As Roland already mentioned it works good on our test site with this URL so it is something we check on your site and find the cause.
Kind regards,
Tharuna
=========================
If you use our extensions, please post a rating and a review at the Joomla! Extension Directory
Hello,
Thank you for sending your site details. I figured out the issue, one of the folder of com_csvi was missing in your site files. I uploaded the folder and its files and your cron URL is running good now. Please check and let me know.
Kind regards,
Tharuna
=========================
If you use our extensions, please post a rating and a review at the Joomla! Extension Directory
Yess!! I think that all it is ok now. I will do more test.
What directories and files has uoloaded. I would need to do the sames changes in production web.
Thanks for your help!!
Hello,
I have sent a reply to your private message with folder and files and the location it needs to be put in. That would solve the problem in your production site too.
Kind regards,
Tharuna
=========================
If you use our extensions, please post a rating and a review at the Joomla! Extension Directory
The production server works fine too.
I have another question with crontasks but I don't know if I must open a new post or here.
You can configure a crontask with several templates in an order of execution??
I need import 5 csv in an determinate order and I want to know If there are any form that not was 5 crontask
A problem.
With you calls the url for a cronjob doesn't works because wget command doesn't executes js or ajax. When you access by web browser works fine but in cron not.
I develop a little program with c# that sends a httpwebrequest to the command url and same issue.
The problem is that the import appears in list of executions, but the registers processed are 0:
Acción Tipo de acción Nombre de la plantilla Inicio Final Usuario Registros Ejecución cancelada Registro de depuración
Importar Custom field Import 06-10-2016 19:25:02 Desconocido 0 No No hay registro de depuración disponible
I am trying to solve this but I would need your help please :)
Hello,
You can configure a crontask with several templates in an order of execution??
That is not something CSVI needs to solve but you would solve that in your crontask. You would need to create a job that calls the 5 different URLs.
I want to know If there are any form that not was 5 crontask
You will need 5 crontasks. CSVI can process multiple files in a folder but this doesn't guarantee in which order they are imported and only 1 template will be used. This is not what you are looking for as far as I can tell.
When you access by web browser works fine but in cron not.
Correct, the import via a URL requires JavaScript to allow long running processes. That is why we offer a real cron script as well to run it through a normal cron system. In your case you are mimicing a cron process.
The only thing I can think of that may be of help for you is to use a headless browser perhaps. Although I never tried it as normal hosts have cron jobs and that works easiest.
Kind regards,
RolandD
=========================
If you use our extensions, please post a rating and a review at the Joomla! Extension Directory
I never had test the headless navigation.
I develop a test with several headless extensions and I make it works with phantomjs and selenium web driver.
The aplication that we develop to upload the csv tu hosting will execute the cron too.
Thanks!!
Thank you for your feedback. You have done something very much out of the box but I am happy to hear it actually works.
Kind regards,
RolandD
=========================
If you use our extensions, please post a rating and a review at the Joomla! Extension Directory
Log in to reply to this topic.