Calendar 1.4.6 not working on localhost

Third Party Plugins to CMSimple - how to install, use and create plugins

Moderator: Tata

Tata
Posts: 2473
Joined: Tue May 20, 2008 5:34 am
Location: Slovakia
Contact:

Calendar 1.4.6 not working on localhost

Postby Tata » Sat Dec 17, 2016 8:10 pm

I try to build a website with most frequently used plugins - as a demo webpage.
Now I have found that the ca,endar 1.4.6 doesn't work on localhost (CMSimple_XH 1.6.9).
There is only the start time and evtl. the internal link saved. All other fields in Eventlist are empty and there are also no event days shown in any calendar (IM calendar, multicalendar etc.). Editting the webpage on line, everything works.
What's wrong?
CMSimple.sk
It's no shame to ask for an answer if all efforts failed.
But it's awful to ask without any effort to find the answer yourself.

cmb
Posts: 11858
Joined: Tue Jun 21, 2011 11:04 am
Location: Mü-Sa, RLP, DE
Contact:

Re: Calendar 1.4.6 not working on localhost

Postby cmb » Sun Dec 18, 2016 12:31 pm

Tata wrote:Now I have found that the ca,endar 1.4.6 doesn't work on localhost (CMSimple_XH 1.6.9).

Is it on a Mac? Did it work with former CMSimple_XH versions?
Christoph M. Becker –Plugins for CMSimple_XH, but not for CMSimple 4+

Tata
Posts: 2473
Joined: Tue May 20, 2008 5:34 am
Location: Slovakia
Contact:

Re: Calendar 1.4.6 not working on localhost

Postby Tata » Sun Dec 18, 2016 2:42 pm

cmb wrote:Is it on a Mac? Did it work with former CMSimple_XH versions?

Yes, it's on iMAC and it worked with previous versions. Now it also works fine online.
You may have a look at what I am working now on at http://cmsimple_xh_plugins.cmsimple.sk.
CMSimple.sk
It's no shame to ask for an answer if all efforts failed.
But it's awful to ask without any effort to find the answer yourself.

cmb
Posts: 11858
Joined: Tue Jun 21, 2011 11:04 am
Location: Mü-Sa, RLP, DE
Contact:

Re: Calendar 1.4.6 not working on localhost

Postby cmb » Sun Dec 18, 2016 11:06 pm

Tata wrote:Yes, it's on iMAC and it worked with previous versions.

There might be line ending issues? (I can only guess wildly, because I wouldn't have an iMac available, and the issue might not even be iMac specific.)

Tata wrote:You may have a look at what I am working now on at http://cmsimple_xh_plugins.cmsimple.sk.

Great! Perhaps it might be a good idea to join forces with Hartmut, Michael and maybe others?
Christoph M. Becker –Plugins for CMSimple_XH, but not for CMSimple 4+

Tata
Posts: 2473
Joined: Tue May 20, 2008 5:34 am
Location: Slovakia
Contact:

Re: Calendar 1.4.6 not working on localhost

Postby Tata » Sun Dec 18, 2016 11:44 pm

cmb wrote:There might be line ending issues? (I can only guess wildly, because I wouldn't have an iMac available, and the issue might not even be iMac specific.)

I don't know. There is no notice nor warning concerning the plugin in debugger report. I belive more that it may be cause by new PHP. It has worked before. Now I see thet it doesn't work even on the pages from older times. So either it is the PHP versioin or new OSX El Capitan. And I don't know how to find the reason.

cmb wrote:
Tata wrote:You may have a look at what I am working now on at http://cmsimple_xh_plugins.cmsimple.sk.

This is only an idea and the texts are only for design purpose. It should be in real more descriptiv.
If such approach would be acceptable, there is to think about the name of the webpage and the domain. The page may be redirected wherever. If somebody would be interested to work on this page, I can give him full access (incl. FTP).
Something wired again.
I demonstrate the usage of cocontent. Each H1 page has its cocontent in the first newsbox. In template I have

Code: Select all

               <?php                         
                    $test 
=  strip_tags(coco('cocontent'));
                    $test = str_replace(array(" ", "\r","\n", " "), '', $test);
                    if(strlen($test) > 0) {
                         echo coco('cocontent');
                    }else{
                         echo newsbox('News01');
               }?>

It works fine on localhost but not online. Is there something wrong with the code?
CMSimple.sk
It's no shame to ask for an answer if all efforts failed.
But it's awful to ask without any effort to find the answer yourself.

cmb
Posts: 11858
Joined: Tue Jun 21, 2011 11:04 am
Location: Mü-Sa, RLP, DE
Contact:

Re: Calendar 1.4.6 not working on localhost

Postby cmb » Mon Dec 19, 2016 11:45 am

Tata wrote:I belive more that it may be cause by new PHP.

Indeed, it is is, because support for the e modifier of preg_replace() has been removed as of PHP 7.0.0. And there are other issues with Calendar running on PHP 7. The posted diff might serve as base for a new calendar release.

Tata wrote:It works fine on localhost but not online. Is there something wrong with the code?

On a quick glance the code looks fine. Maybe there are caching issues again (OPcache)?
Christoph M. Becker –Plugins for CMSimple_XH, but not for CMSimple 4+

Tata
Posts: 2473
Joined: Tue May 20, 2008 5:34 am
Location: Slovakia
Contact:

Re: Calendar 1.4.6 not working on localhost

Postby Tata » Mon Dec 19, 2016 11:49 am

cmb wrote:On a quick glance the code looks fine. Maybe there are caching issues again (OPcache)?

Seems to be the case. I am slowly sick of these new changes on servers.
CMSimple.sk
It's no shame to ask for an answer if all efforts failed.
But it's awful to ask without any effort to find the answer yourself.

cmb
Posts: 11858
Joined: Tue Jun 21, 2011 11:04 am
Location: Mü-Sa, RLP, DE
Contact:

Re: Calendar 1.4.6 not working on localhost

Postby cmb » Mon Dec 19, 2016 12:06 pm

Tata wrote:
cmb wrote:On a quick glance the code looks fine. Maybe there are caching issues again (OPcache)?

Seems to be the case. I am slowly sick of these new changes on servers.

If you don't want to or can't reconfigure the OPcache, you can try to prepend the following line to PHP files your modifying (such as template.htm):

Code: Select all

<?php if (function_exists('opcache_invalidate')) opcache_invalidate(__FILE__)?>
Christoph M. Becker –Plugins for CMSimple_XH, but not for CMSimple 4+

Tata
Posts: 2473
Joined: Tue May 20, 2008 5:34 am
Location: Slovakia
Contact:

Re: Calendar 1.4.6 not working on localhost

Postby Tata » Mon Dec 19, 2016 2:35 pm

Thank's, will try.
This should be added somewhere to Tips&Tricks section.
CMSimple.sk
It's no shame to ask for an answer if all efforts failed.
But it's awful to ask without any effort to find the answer yourself.


Return to “Addons and Plugins”

Who is online

Users browsing this forum: No registered users and 1 guest