1. cbacchi
  2. RO CSVI
  3. Monday, 08 August 2016
  4.  Subscribe via email
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
Accepted Answer Pending Moderation
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
  1. more than a month ago
  2. RO CSVI
  3. # 21
Accepted Answer Pending Moderation
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
  1. more than a month ago
  2. RO CSVI
  3. # 22
Accepted Answer Pending Moderation
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.
  1. more than a month ago
  2. RO CSVI
  3. # 23
Accepted Answer Pending Moderation
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
  1. more than a month ago
  2. RO CSVI
  3. # 24
Accepted Answer Pending Moderation
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...

http://domain.com/index.php?option=com_csvi&view=import&csvi_template_id=2&key=key&task=import
  1. more than a month ago
  2. RO CSVI
  3. # 25
Accepted Answer Pending Moderation
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
  1. more than a month ago
  2. RO CSVI
  3. # 26
Accepted Answer Pending Moderation
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
  1. more than a month ago
  2. RO CSVI
  3. # 27
Accepted Answer Pending Moderation
Hello,

With the parameters I meant this part [code?option=com_csvi&view=import&csvi_template_id=2&key=SarverCronTaskCat&task=import[/code]

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
?><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
  1. more than a month ago
  2. RO CSVI
  3. # 28
Accepted Answer Pending Moderation
I receive this message:

/var/sentora/hostdata/name/public_html/http://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/http://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/http://domainname.com/components/com_csvi/controllers/imports.php on line 78
  1. more than a month ago
  2. RO CSVI
  3. # 29
Accepted Answer Pending Moderation
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
  1. more than a month ago
  2. RO CSVI
  3. # 30
Accepted Answer Pending Moderation
/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
  1. more than a month ago
  2. RO CSVI
  3. # 31
Accepted Answer Pending Moderation
Hello,
As per the data in your previous post the template id is 1 but in the cron URL http://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
  1. more than a month ago
  2. RO CSVI
  3. # 32
Accepted Answer Pending Moderation
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:

http://domain.com/index.php?option=com_csvi&view=import&csvi_template_id=1&key=key&task=import

Thanks!!!
  1. more than a month ago
  2. RO CSVI
  3. # 33
Accepted Answer Pending Moderation
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
  1. more than a month ago
  2. RO CSVI
  3. # 34
Accepted Answer Pending Moderation
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
  1. more than a month ago
  2. RO CSVI
  3. # 35
Accepted Answer Pending Moderation
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!!
  1. more than a month ago
  2. RO CSVI
  3. # 36
Accepted Answer Pending Moderation
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
  1. more than a month ago
  2. RO CSVI
  3. # 37
Accepted Answer Pending Moderation
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
  1. more than a month ago
  2. RO CSVI
  3. # 38
Accepted Answer Pending Moderation
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 :)
  1. more than a month ago
  2. RO CSVI
  3. # 39
Accepted Answer Pending Moderation
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
  1. more than a month ago
  2. RO CSVI
  3. # 40
  • Page :
  • 1
  • 2
  • 3


There are no replies made for this post yet.
Be one of the first to reply to this post!