Welcome Guest ( Log In | Register )

 Forum Rules Extensions Support
 
Reply to this topicStart new topic
> Post By Email Pro - Cron Warnings, JROUTER_MODE warnings
Brian Craigie
post Jan 30 2019, 03:20 PM
Post #1


Newbie
*

Group: Members
Posts: 7
Joined: 3-October 15
Member No.: 2,262



Hi,

When I run the cron (... is my own path to the web folder)

/bin/php -q .../administrator/components/com_post_by_email/cron.post_by_email.php >> /dev/null

, I get the following warnings:

PHP Notice: Constant JROUTER_MODE_RAW already defined in .../libraries/import.php on line 60
PHP Notice: Constant JROUTER_MODE_SEF already defined in .../libraries/import.php on line 67

It would be nice to silence those warnings by fixing the php code. :-)

Go to the top of the page
 
+Quote Post
Web Design Seo
post Jan 31 2019, 08:42 AM
Post #2


Web Design Seo
****

Group: Root Admin
Posts: 4,332
Joined: 29-April 09
From: Sofia
Member No.: 1



Brian Craigie, there is no JROUTER_MODE_RAW and JROUTER_MODE_SEF constants in whole "Post by email" component, these constants and errors are NOT from our component. Also, there is no folder or file with name "libraries" in "Post by email" component.

Probably errors are from "libraries" folder of your version of Joomla.


--------------------
Правила на форума | Forum Rules | How to receive support. 3D Web Design: Уеб дизайн, Seo оптимизация, Web Site Extensions, Oscommerce Addons, Wordpress plugins and Joomla Extensions. Изработка на уеб сайтове и оптимизация на сайт за търсачки и Seo услуги.
Go to the top of the page
 
+Quote Post
Brian Craigie
post Mar 12 2020, 08:13 AM
Post #3


Newbie
*

Group: Members
Posts: 7
Joined: 3-October 15
Member No.: 2,262



QUOTE (Web Design Seo @ Jan 31 2019, 08:42 AM) *
Brian Craigie, there is no JROUTER_MODE_RAW and JROUTER_MODE_SEF constants in whole "Post by email" component, these constants and errors are NOT from our component. Also, there is no folder or file with name "libraries" in "Post by email" component.

Probably errors are from "libraries" folder of your version of Joomla.


Thanks smile.gif

However if you look at your code administrator/components/com_post_by_email/cron.post_by_email.php

you will see:

CODE
49 require_once(JPATH_BASE.DS.'includes'.DS.'framework.php');
50
51 // Get the framework.
52 require_once JPATH_LIBRARIES . '/import.php';


includes/framework.php does this:

CODE
require_once JPATH_LIBRARIES . '/import.legacy.php';


import.legacy.php does this:

CODE
const JROUTER_MODE_RAW = 0;
const JROUTER_MODE_SEF = 1;


And then on line 52 in your script, you require import.php which also does:

CODE
const JROUTER_MODE_RAW = 0;
const JROUTER_MODE_SEF = 1;


This is what causes the warning that these constants are already defined.

My suggestion is you don't need to require both framework.php and import.php

Your script produces no errors if I comment out line 52 which requires the import.php

Hope this helps. smile.gif



Go to the top of the page
 
+Quote Post
Web Design Seo
post Mar 12 2020, 08:35 AM
Post #4


Web Design Seo
****

Group: Root Admin
Posts: 4,332
Joined: 29-April 09
From: Sofia
Member No.: 1



Thanks, Brian. Extension is not updated from many time, but Joomla was changed, libraries files also. I will check it today and will made changes.


--------------------
Правила на форума | Forum Rules | How to receive support. 3D Web Design: Уеб дизайн, Seo оптимизация, Web Site Extensions, Oscommerce Addons, Wordpress plugins and Joomla Extensions. Изработка на уеб сайтове и оптимизация на сайт за търсачки и Seo услуги.
Go to the top of the page
 
+Quote Post

Reply to this topicStart new topic
1 User(s) are reading this topic (1 Guests and 0 Anonymous Users)
0 Members:

Collapse

> Similar Topics

  Topic Replies Topic Starter Views Last Action
No new Cron Jobs Not Executing With Easycron After Updating
4 Kat 273,410 9th September 2021 - 06:41 PM
Last post by: Kat
No New Posts Cron Jobs Failing
1 Kat 62,321 29th July 2021 - 06:08 AM
Last post by: Web Design Seo
No new Pinned: Topic has attachmentsPost By Email Pro
Pro version of Post By Email component
116 Ivan Stamenov 630,492 24th March 2021 - 01:56 PM
Last post by: Web Design Seo
No New Posts Post By Email To K2 Images Not Resizing
1 bossies 127,191 31st May 2019 - 10:49 AM
Last post by: Web Design Seo
No New Posts Post By Email, Error 500
500 error on backend
1 galamarco 172,089 17th January 2019 - 06:29 AM
Last post by: Web Design Seo
No New Posts Cron Job Working But With Notices
1 Kat 48,959 5th May 2017 - 05:56 AM
Last post by: Web Design Seo
No new Post By Email Not Working Since Joomla 3.5.0 Update [solved]
5 tompuchner 135,055 2nd May 2016 - 07:04 AM
Last post by: Web Design Seo
No New Posts Post By Email Using Mms On A Mobile Phone
1 alexilio 122,503 13th April 2016 - 09:44 AM
Last post by: Web Design Seo
No New Posts Post By Email Jomsocial - Unable To Post To Wall
3 uglykidjoe 96,416 11th February 2016 - 07:25 AM
Last post by: Web Design Seo
No New Posts Post By Email Doesn't Works
1 cranky69 107,849 1st December 2015 - 10:30 AM
Last post by: Web Design Seo


 



RSS Lo-Fi Version Time is now: 1st June 2026 - 11:38 PM