Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Events calendar does not work #6710

Closed
atasingorneq opened this Issue Feb 20, 2019 · 18 comments

Comments

Projects
None yet
7 participants
@atasingorneq
Copy link

atasingorneq commented Feb 20, 2019

Expected behavior

Go to /events and the calendar should appear.

Actual behavior

No Calendar appear. Tested with the themes frio and vier.
friendica-kalender

Here is browser console output:
TypeError: o is undefined[Weitere Informationen] fullcalendar.min.js:6:15576
<anonym> https://friendica.xyz/view/asset/fullcalendar/dist/fullcalendar.min.js:6 e https://friendica.xyz/view/asset/fullcalendar/dist/fullcalendar.min.js:6
<anonym> https://friendica.xyz/view/asset/fullcalendar/dist/fullcalendar.min.js:8 e https://friendica.xyz/view/asset/fullcalendar/dist/fullcalendar.min.js:6
<anonym> https://friendica.xyz/view/asset/fullcalendar/dist/fullcalendar.min.js:6 e https://friendica.xyz/view/asset/fullcalendar/dist/fullcalendar.min.js:6
<anonym> https://friendica.xyz/view/asset/fullcalendar/dist/fullcalendar.min.js:12 e https://friendica.xyz/view/asset/fullcalendar/dist/fullcalendar.min.js:6
<anonym> https://friendica.xyz/view/asset/fullcalendar/dist/fullcalendar.min.js:6
<anonym> https://friendica.xyz/view/asset/fullcalendar/dist/fullcalendar.min.js:6
<anonym> https://friendica.xyz/view/asset/fullcalendar/dist/fullcalendar.min.js:6
<anonym> https://friendica.xyz/view/asset/fullcalendar/dist/fullcalendar.min.js:6

TypeError: $(...).fullCalendar is not a function[Weitere Informationen] mod_events.js:8:24
<anonym> https://friendica.xyz/view/theme/frio/js/mod_events.js:8 i4jQuery

Steps to reproduce the problem

Go to /events. The Browser ist Firefox 65.0 on Linux

Discussion: https://friendica.xyz/display/adf174d5-445c-6b3a-c7a9-927821737075

Friendica version you encountered the problem

Friendica 2019.03-rc - 1302

Friendica source (git, zip)

git

PHP version

7.2.13

SQL version

5.5.5-10.0.34-MariaDB

@tobiasd tobiasd added this to the 2019.03 milestone Feb 21, 2019

@tobiasd

This comment has been minimized.

Copy link
Collaborator

tobiasd commented Feb 21, 2019

I sadly do not see this error in Firefox 60 (ESR) or Vivaldi. But thanks for reporting it here again, so it does not get forgotten! (associated forum thread)

@tobiasd tobiasd added the Calendar label Feb 21, 2019

@annando

This comment has been minimized.

Copy link
Collaborator

annando commented Feb 21, 2019

Can you try another browser?

@hoergen

This comment has been minimized.

Copy link
Collaborator

hoergen commented Feb 21, 2019

I had the same yesterday morning. Checked it this morning again and events are there again.

@atasingorneq

This comment has been minimized.

Copy link
Author

atasingorneq commented Feb 21, 2019

I guess I found the problem. A few days ago I saw this message when i run my update.
Installing dependencies from lock file Warning: The lock file is not up to date with the latest changes in composer.json. You may be getting outdated dependencies. Run update to update them.

To solve this problem I execute this bin/composer.phar update --no-dev and after this i start my update script again. Everything looks fine but a few days later I notice the missing calendar.

When I started my update script this mornig, this notice appears:
error: Your local changes to the following files would be overwritten by merge: composer.lock Please, commit your changes or stash them before you can merge.

So I rename my local composer.lock, retry the update, the new composer.lock has been downloaded and after the update script (including a bin/composer.phar install --no-dev) the calendar works again.

So I guess the problem was a layman's attempt to solve a problem. Sorry for this ;-)

@nupplaphil

This comment has been minimized.

Copy link
Collaborator

nupplaphil commented Feb 21, 2019

The lock message should now be solved in general, thanks to #6713

@realkinetix

This comment has been minimized.

Copy link

realkinetix commented Feb 25, 2019

My node is on -RC and I did a pull a few hours ago.

I just noticed that this issue is occurring on my node, both in Firefox and Chrome. Here's Chrome's output when at /events:

fullcalendar.min.js:6 Uncaught TypeError: Cannot read property 'fn' of undefined
    at Object.<anonymous> (fullcalendar.min.js:6)
    at e (fullcalendar.min.js:6)
    at Object.<anonymous> (fullcalendar.min.js:8)
    at e (fullcalendar.min.js:6)
    at Object.<anonymous> (fullcalendar.min.js:6)
    at e (fullcalendar.min.js:6)
    at Object.<anonymous> (fullcalendar.min.js:12)
    at e (fullcalendar.min.js:6)
    at fullcalendar.min.js:6
    at fullcalendar.min.js:6
    at fullcalendar.min.js:6
    at fullcalendar.min.js:6
mod_events.js:8 Uncaught TypeError: $(...).fullCalendar is not a function
    at HTMLDocument.<anonymous> (mod_events.js:8)
    at i (jquery.min.js:2)
    at Object.fireWith [as resolveWith] (jquery.min.js:2)
    at Function.ready (jquery.min.js:2)
    at HTMLDocument.J (jquery.min.js:2)

Firefox's output:

TypeError: o is undefined[Learn More] fullcalendar.min.js:6:15576

    <anonymous> https://social.isurf.ca/view/asset/fullcalendar/dist/fullcalendar.min.js:6 e https://social.isurf.ca/view/asset/fullcalendar/dist/fullcalendar.min.js:6 <anonymous> https://social.isurf.ca/view/asset/fullcalendar/dist/fullcalendar.min.js:8 e https://social.isurf.ca/view/asset/fullcalendar/dist/fullcalendar.min.js:6 <anonymous> https://social.isurf.ca/view/asset/fullcalendar/dist/fullcalendar.min.js:6 e https://social.isurf.ca/view/asset/fullcalendar/dist/fullcalendar.min.js:6 <anonymous> https://social.isurf.ca/view/asset/fullcalendar/dist/fullcalendar.min.js:12 e https://social.isurf.ca/view/asset/fullcalendar/dist/fullcalendar.min.js:6 <anonymous> https://social.isurf.ca/view/asset/fullcalendar/dist/fullcalendar.min.js:6 <anonymous> https://social.isurf.ca/view/asset/fullcalendar/dist/fullcalendar.min.js:6 <anonymous> https://social.isurf.ca/view/asset/fullcalendar/dist/fullcalendar.min.js:6 <anonymous> https://social.isurf.ca/view/asset/fullcalendar/dist/fullcalendar.min.js:6 

TypeError: $(...).fullCalendar is not a function[Learn More] mod_events.js:8:24

    <anonymous> https://social.isurf.ca/view/theme/frio/js/mod_events.js:8 i4jQuery
    i
    fireWith
    ready
    J 

Anything else I can gather to help pinpoint this?

@MrPetovan

This comment has been minimized.

Copy link
Collaborator

MrPetovan commented Feb 26, 2019

I've tried to reproduce this issue on multiple browsers and it always shows. So far:

  • Windows 10 Vivaldi 2.3.1440.48
  • Windows 10 Firefox Quantum 65.0.1
  • iOS 12.1.4 Safari
@MrPetovan

This comment has been minimized.

Copy link
Collaborator

MrPetovan commented Feb 26, 2019

Ah-ha! social.isurf.ca has FullCalendar v3.10.0, while my node has FullCalendar v3.9.0

See https://social.isurf.ca/view/asset/fullcalendar/dist/fullcalendar.min.js
Versus https://friendica.mrpetovan.com/view/asset/fullcalendar/dist/fullcalendar.min.js

@realkinetix Did you by any chance run composer update? In this case, please run the following commands at the base of your install:

git checkout 2019.3-RC #if you weren't on this branch
git checkout -- . # resets all files as they are on the remote branch
#then
bin/composer.phar install --no-dev # to reset the dependencies to the working version

And then all your users should clear their browser cache once you verified that https://social.isurf.ca/view/asset/fullcalendar/dist/fullcalendar.min.js is showing 3.9.0.

@MrPetovan

This comment has been minimized.

Copy link
Collaborator

MrPetovan commented Feb 26, 2019

@atasingorneq I just registered an account on friendica.xyz, I was able to display the calendar, and your version of FullCalendar is the expected 3.9.0. Do you still have the issue?

@realkinetix

This comment has been minimized.

Copy link

realkinetix commented Feb 26, 2019

Interesting, and thanks for the fix information! I think I must be missing some information on how one can mess up their Friendica environment with "composer.phar update".

My apologies for the noise then! The downgrade to 3.9.0 fixed things.

@MrPetovan

This comment has been minimized.

Copy link
Collaborator

MrPetovan commented Feb 26, 2019

Yay! The minor (!) release of FullCalendar actually mentions Potentially breaking change: https://github.com/fullcalendar/fullcalendar/releases/tag/v3.10.0

This is why you should verify all upgrades when you use composer update. First do a composer update --dry-run to see which packages would be upgraded in a real run. From the list, consult the changelog of all prospective upgrades, or een the diff between the two versions on GitHub. Then you can start updating one package at a time with composer update <package>, and test the result on your project.

This is the information you missed before running composer update! 😉

@MrPetovan

This comment has been minimized.

Copy link
Collaborator

MrPetovan commented Feb 26, 2019

By the way, the particular issue is that the npm-asset/fullcalendar package doesn't have a direct dependency to jQuery and Moment anymore, which means that the Moment package was simply removed when you upgraded to version 3.10.0. The solution is to manually require npm-asset/moment:^2.20.1 in Friendica to have access to it again. I'll submit a Composer files patch for this.

@realkinetix

This comment has been minimized.

Copy link

realkinetix commented Feb 26, 2019

Thanks for the information on composer update! I presume we shouldn't be running 'update' on our production systems then? From what I'm understanding, install will install things at a particular version that I presume we have specified somewhere, but update will then move component versions forward if it can?

@MrPetovan

This comment has been minimized.

Copy link
Collaborator

MrPetovan commented Feb 26, 2019

Yes. The composer.json file defines loose version dependencies, and the composer.lock file holds the specific version for each dependency that we have officially and successfully tested.

@realkinetix

This comment has been minimized.

Copy link

realkinetix commented Feb 26, 2019

Excellent, got it, thanks!

@atasingorneq

This comment has been minimized.

Copy link
Author

atasingorneq commented Feb 26, 2019

@MrPetovan the calendar works for me and my test account on friendica.xyz. I tested it with different Browsers and computers.

But it is funny, that you can Register an account in my node. Normaly i must approve a new account. It seems that the settings have changed. Weird ...

@MrPetovan

This comment has been minimized.

Copy link
Collaborator

MrPetovan commented Feb 26, 2019

Closed via #6759

@MrPetovan MrPetovan closed this Feb 26, 2019

@MrPetovan

This comment has been minimized.

Copy link
Collaborator

MrPetovan commented Feb 26, 2019

But it is funny, that you can Register an account in my node. Normaly i must approve a new account. It seems that the settings have changed. Weird ...

Indeed, your node is advertising it's own register policy as REGISTER_APPROVE. See https://friendica.xyz/friendica/json

Can you please try to register a new user and immediately check its row in the user table? The blocked field should be 1.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.